djs-systems
Version:
The simplest way to build complex Discord bots.
40 lines (39 loc) • 1.48 kB
TypeScript
import { TextChannel, Role } from 'discord.js';
import { ExtendedInteraction } from './typedef';
import { CustomizableButton } from './typedef/CustomizableButton';
/**
* **Documentation Url** of the type: https://simplyd.js.org/docs/systems/betterBtnRole#buttons
*/
export declare type BetterBtnRoleButtons = {
role?: Role;
} & CustomizableButton;
/**
* **Documentation Url** of the type: https://simplyd.js.org/docs/systems/betterBtnRole#messagecontents
*/
export interface MessageContents {
invalidMessage?: string;
otherUserMessage?: string;
update?: string;
success?: string;
overload?: string;
noButton?: string;
}
/**
* **Documentation Url** of the options: https://simplyd.js.org/docs/systems/betterBtnRole#betterbtnoptions
*/
export declare type betterbtnOptions = {
strict?: boolean;
type?: 'Add' | 'Remove';
channel?: TextChannel;
button?: BetterBtnRoleButtons;
messageId?: string;
contents?: MessageContents;
};
/**
* A **Button Role builder** that lets **admins create** button roles. | *Requires: [**manageBtnRole()**](https://simplyd.js.org/docs/handler/manageBtnRole)*
* @param interaction
* @param options
* @link `Documentation:` https://simplyd.js.org/docs/systems/betterBtnRole
* @example simplydjs.betterBtnRole(client, interaction)
*/
export declare function betterBtnRole(interaction: ExtendedInteraction, options?: betterbtnOptions): Promise<void>;