seyfert
Version:
The most advanced framework for discord bots
43 lines (42 loc) • 1.4 kB
TypeScript
import { type EmojiResolvable } from '../common';
import { type APIButtonComponent, type ButtonStyle } from '../types';
import { BaseComponentBuilder } from './Base';
/**
* Represents a button component.
* @template Type - The type of the button component.
*/
export declare class Button extends BaseComponentBuilder<APIButtonComponent> {
constructor(data?: Partial<APIButtonComponent>);
/**
* Sets the custom ID for the button.
* @param id - The custom ID to set.
* @returns The modified Button instance.
*/
setCustomId(id: string): this;
/**
* Sets the URL for the button.
* @param url - The URL to set.
* @returns The modified Button instance.
*/
setURL(url: string): this;
/**
* Sets the label for the button.
* @param label - The label to set.
* @returns The modified Button instance.
*/
setLabel(label: string): this;
/**
* Sets the emoji for the button.
* @param emoji - The emoji to set.
* @returns The modified Button instance.
*/
setEmoji(emoji: EmojiResolvable): this;
/**
* Sets the disabled state of the button.
* @param disabled - Whether the button should be disabled or not.
* @returns The modified Button instance.
*/
setDisabled(disabled?: boolean): this;
setStyle(style: ButtonStyle): this;
setSKUId(skuId: string): this;
}