/** * The type of component * @see {@link https://discord.com/developers/docs/components/reference#what-is-a-component} */ export declare enum MessageComponentTypes { ACTION_ROW = 1, BUTTON = 2, STRING_SELECT = 3, INPUT_TEXT = 4, USER_SELECT = 5, ROLE_SELECT = 6, MENTIONABLE_SELECT = 7, CHANNEL_SELECT = 8, SECTION = 9, TEXT_DISPLAY = 10, THUMBNAIL = 11, MEDIA_GALLERY = 12, FILE = 13, SEPARATOR = 14, CONTAINER = 17, LABEL = 18 } export type MessageComponent = ActionRow | Button | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | TextInput | Section | TextDisplay | Thumbnail | MediaGallery | FileComponent | Separator | Container | Label; export declare enum ButtonStyleTypes { PRIMARY = 1, SECONDARY = 2, SUCCESS = 3, DANGER = 4, LINK = 5, PREMIUM = 6 } interface BaseComponent { type: MessageComponentTypes; id?: number; } interface BaseButton extends BaseComponent { disabled?: boolean; type: MessageComponentTypes.BUTTON; } interface LabeledButton extends BaseButton { emoji?: Pick; label: string; } interface PremiumButton extends BaseButton { sku_id: string; style: ButtonStyleTypes.PREMIUM; } interface LinkButton extends LabeledButton { url: string; style: ButtonStyleTypes.LINK; } interface CustomButton extends LabeledButton { custom_id: string; style: ButtonStyleTypes.PRIMARY | ButtonStyleTypes.SECONDARY | ButtonStyleTypes.SUCCESS | ButtonStyleTypes.DANGER; } /** * Button component * @see {@link https://discord.com/developers/docs/components/reference#button} */ export type Button = CustomButton | LinkButton | PremiumButton; /** * Action row component * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ export type ActionRow = BaseComponent & { type: MessageComponentTypes.ACTION_ROW; components: Array