declare module "@discord-interactions/builders" { // Generated by dts-bundle-generator v6.12.0 import { APIActionRowComponent, APIActionRowComponentTypes, APIAllowedMentions, APIApplicationCommand, APIApplicationCommandAttachmentOption, APIApplicationCommandBasicOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandOption, APIApplicationCommandOptionChoice, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandUserOption, APIBaseComponent, APIButtonComponent, APIButtonComponentWithCustomId, APIButtonComponentWithURL, APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIInteractionResponseCallbackData, APIInteractionResponseChannelMessageWithSource, APIInteractionResponseUpdateMessage, APIMessageActionRowComponent, APIMessageComponentEmoji, APIModalActionRowComponent, APIModalInteractionResponseCallbackData, APISelectMenuComponent, APISelectMenuOption, APITextInputComponent, ApplicationCommandOptionType, ApplicationCommandType, ChannelType, ComponentType, InteractionResponseType, LocalizationMap, RESTPostAPIApplicationCommandsJSONBody, RESTPostAPIChatInputApplicationCommandsJSONBody, RESTPostAPIContextMenuApplicationCommandsJSONBody, RESTPostAPIWebhookWithTokenJSONBody } from 'discord-api-types/v10'; import { Blob, FormData } from 'formdata-node'; /** * Data structure that makes it easy to interact with a bitfield. */ export class Bitfield { bitfield?: bigint; constructor(...bits: bigint[]); /** * Checks whether the bitfield has a bit * @param {bigint} bit Bit to check for */ has(bit: bigint): boolean; /** * Adds bits to these ones. * @param {...bigint} [bits] Bits to add */ add(...bits: bigint[]): this; /** * Removes bits from these. * @param {...BitFieldResolvable} [bits] Bits to remove * @returns {BitField} These bits or new BitField if the instance is frozen. */ remove(...bits: bigint[]): this; disallowAll(): void; allowAll(): void; toJSON(): string | null; } /** * @hidden */ export type CommandDataBase = Omit; export abstract class CommandBuilderBase { /** * The name of this context menu command */ name: string; /** * The localized names for this command */ name_localizations: LocalizationMap; /** * The type of this context menu command */ abstract type: ApplicationCommandType; /** * Whether the command is visible in DMs - Only available for global commands and defaults to true. */ dm_permission?: boolean; /** * Default member permissions required to use the command */ default_member_permissions: Bitfield; constructor(data: Data | string); /** * Set the name */ setName(name: string): this; /** * Set a dictionary of localized names */ setNameLocalizations(localizations: LocalizationMap): this; /** * Set a single locale's name */ setLocalizedName(locale: keyof LocalizationMap, name: string): this; /** * Set whether this command will be visible in DMs - Only applicable to Global commands. */ setDMEnabled(value: boolean): this; setRequiredPermissions(permissions: Bitfield): this; addRequiredPermissions(...permissions: bigint[]): this; removeRequiredPermissions(...permissions: bigint[]): this; clearRequiredPermissions(): this; disallowAllPermissions(): this; equals(remote: APIApplicationCommand): boolean; /** * Returns the final data that should be sent to Discord. */ abstract toJSON(): Data; } export interface ToAPIApplicationCommandOptions { toJSON: () => OptionType; } export abstract class ChatInputCommandBuilderBase extends CommandBuilderBase { type: ApplicationCommandType.ChatInput; description: string; description_localizations: LocalizationMap; options: ToAPIApplicationCommandOptions[]; constructor(name: RESTPostAPIChatInputApplicationCommandsJSONBody | string, description?: string); /** * Set the description * * @param description The description */ setDescription(description: string): this; /** * Set a dictionary of localized descriptions */ setDescriptionLocalizations(localizations: LocalizationMap): this; /** * Set a single locale's description */ setLocalizedDescription(locale: keyof LocalizationMap, description: string): this; equals(remote: APIApplicationCommand & { type: ApplicationCommandType.ChatInput; }): boolean; } export abstract class SlashCommandOptionBase { abstract readonly type: ApplicationCommandOptionType; required: boolean; name: string; name_localizations: LocalizationMap; description: string; description_localizations: LocalizationMap; constructor(name: string, description: string); /** * Marks the option as required * * @param required If this option should be required */ setRequired(required: boolean): this; /** * Set a dictionary of localized names */ setNameLocalizations(localizations: LocalizationMap): this; /** * Set a single locale's name */ setLocalizedName(locale: keyof LocalizationMap, name: string): void; /** * Set a dictionary of localized descriptions */ setDescriptionLocalizations(localizations: LocalizationMap): this; /** * Set a single locale's description */ setLocalizedDescription(locale: keyof LocalizationMap, description: string): this; abstract toJSON(): APIApplicationCommandOption; } export class SlashCommandAttachmentOption extends SlashCommandOptionBase { readonly type: ApplicationCommandOptionType.Attachment; toJSON(): APIApplicationCommandAttachmentOption; } export class SlashCommandBooleanOption extends SlashCommandOptionBase { readonly type: ApplicationCommandOptionType.Boolean; toJSON(): APIApplicationCommandBooleanOption; } export const AllowedChannelTypes: readonly [ ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildNews, ChannelType.GuildNewsThread, ChannelType.GuildPublicThread, ChannelType.GuildPrivateThread, ChannelType.GuildStageVoice ]; export type ApplicationCommandOptionAllowedChannelTypes = typeof AllowedChannelTypes[number]; export class SlashCommandChannelOption extends SlashCommandOptionBase { readonly type: ApplicationCommandOptionType.Channel; channel_types?: ApplicationCommandOptionAllowedChannelTypes[]; /** * Adds channel types to this option * * @param channelTypes The channel types to add */ addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]): this; toJSON(): APIApplicationCommandChannelOption; } export class SlashCommandIntegerOption extends SlashCommandOptionBase { type: ApplicationCommandOptionType.Integer; max_value?: number; min_value?: number; choices?: APIApplicationCommandOptionChoice[]; autocomplete?: boolean; setMaxValue(max: number): this; setMinValue(min: number): this; /** * Adds multiple choices for this option * * @param choices The choices to add */ addChoices(...choices: APIApplicationCommandOptionChoice[]): this; setChoices[]>(...choices: Input): this; /** * Marks the option as autocompletable * @param autocomplete If this option should be autocompletable */ setAutocomplete(autocomplete: boolean): this; toJSON(): APIApplicationCommandIntegerOption; } export class SlashCommandMentionableOption extends SlashCommandOptionBase { readonly type: ApplicationCommandOptionType.Mentionable; toJSON(): APIApplicationCommandMentionableOption; } export class SlashCommandNumberOption extends SlashCommandOptionBase { type: ApplicationCommandOptionType.Number; max_value?: number; min_value?: number; choices?: APIApplicationCommandOptionChoice[]; autocomplete?: boolean; setMaxValue(max: number): this; setMinValue(min: number): this; /** * Adds multiple choices for this option * * @param choices The choices to add */ addChoices(...choices: APIApplicationCommandOptionChoice[]): this; setChoices[]>(...choices: Input): this; /** * Marks the option as autocompletable * @param autocomplete If this option should be autocompletable */ setAutocomplete(autocomplete: boolean): this; toJSON(): APIApplicationCommandNumberOption; } export class SlashCommandRoleOption extends SlashCommandOptionBase { type: ApplicationCommandOptionType.Role; toJSON(): APIApplicationCommandRoleOption; } export class SlashCommandStringOption extends SlashCommandOptionBase { type: ApplicationCommandOptionType.String; choices?: APIApplicationCommandOptionChoice[]; autocomplete?: boolean; min_length?: number; max_length?: number; /** * Adds multiple choices for this option * * @param choices The choices to add */ addChoices(...choices: APIApplicationCommandOptionChoice[]): this; setChoices[]>(...choices: Input): this; /** * Marks the option as autocompletable * @param autocomplete If this option should be autocompletable */ setAutocomplete(autocomplete: boolean): this; setMinLength(minLength: number): this; setMaxLength(maxLength: number): this; toJSON(): APIApplicationCommandStringOption; } export class SlashCommandUserOption extends SlashCommandOptionBase { readonly type: ApplicationCommandOptionType.User; toJSON(): APIApplicationCommandUserOption; } export class SubcommandOption extends SlashCommandOptionBase { type: ApplicationCommandOptionType.Subcommand; options: ToAPIApplicationCommandOptions[]; /** * Adds a boolean option * * @param input A function that returns an option builder, or an already built builder */ addBooleanOption(input: SlashCommandBooleanOption): this; /** * Adds a user option * * @param input A function that returns an option builder, or an already built builder */ addUserOption(input: SlashCommandUserOption): this; /** * Adds a channel option * * @param input A function that returns an option builder, or an already built builder */ addChannelOption(input: SlashCommandChannelOption): this; /** * Adds a role option * * @param input A function that returns an option builder, or an already built builder */ addRoleOption(input: SlashCommandRoleOption): this; /** * Adds an attachment option * * @param input A function that returns an option builder, or an already built builder */ addAttachmentOption(input: SlashCommandAttachmentOption): this; /** * Adds a mentionable option * * @param input A function that returns an option builder, or an already built builder */ addMentionableOption(input: SlashCommandMentionableOption): this; /** * Adds a string option * * @param input A function that returns an option builder, or an already built builder */ addStringOption(input: SlashCommandStringOption | Omit | Omit): this; /** * Adds an integer option * * @param input A function that returns an option builder, or an already built builder */ addIntegerOption(input: SlashCommandIntegerOption | Omit | Omit): this; /** * Adds a number option * * @param input A function that returns an option builder, or an already built builder */ addNumberOption(input: SlashCommandNumberOption | Omit | Omit): this; toJSON(): APIApplicationCommandSubcommandOption; } export class SubcommandGroupOption extends SlashCommandOptionBase { type: ApplicationCommandOptionType.SubcommandGroup; options: ToAPIApplicationCommandOptions[]; /** * Adds a subcommand */ addSubcommands(...subcommands: SubcommandOption[]): this; toJSON(): APIApplicationCommandSubcommandGroupOption; } export type CommandGroupData = CommandDataBase & { type: ApplicationCommandType.ChatInput; options: (APIApplicationCommandSubcommandGroupOption | APIApplicationCommandSubcommandOption)[]; }; export class CommandGroupBuilder extends ChatInputCommandBuilderBase { /** * Adds an integer option * * @param input A function that returns an option builder, or an already built builder */ addSubcommandGroups(...subcommandGroups: SubcommandGroupOption[]): this; /** * Adds a subcommand */ addSubcommands(...subcommands: SubcommandOption[]): this; toJSON(): CommandGroupData; } export type ContextCommandData = Omit; export type UserCommandData = ContextCommandData & { type: ApplicationCommandType.User; }; export type MessageCommandData = ContextCommandData & { type: ApplicationCommandType.Message; }; export class UserCommandBuilder extends CommandBuilderBase { type: ApplicationCommandType.User; toJSON(): UserCommandData; equals(other: APIApplicationCommand & { type: ApplicationCommandType.User; }): boolean; } export class MessageCommandBuilder extends CommandBuilderBase { type: ApplicationCommandType.Message; toJSON(): MessageCommandData; equals(other: APIApplicationCommand & { type: ApplicationCommandType.Message; }): boolean; } export type SlashCommandData = CommandDataBase & { type: ApplicationCommandType.ChatInput; options: APIApplicationCommandBasicOption[]; }; export class SlashCommandBuilder extends ChatInputCommandBuilderBase { /** * Adds a boolean option * * @param input A function that returns an option builder, or an already built builder */ addBooleanOption(input: SlashCommandBooleanOption): this; /** * Adds a user option * * @param input A function that returns an option builder, or an already built builder */ addUserOption(input: SlashCommandUserOption): this; /** * Adds a channel option * * @param input A function that returns an option builder, or an already built builder */ addChannelOption(input: SlashCommandChannelOption): this; /** * Adds a role option * * @param input A function that returns an option builder, or an already built builder */ addRoleOption(input: SlashCommandRoleOption): this; /** * Adds an attachment option * * @param input A function that returns an option builder, or an already built builder */ addAttachmentOption(input: SlashCommandAttachmentOption): this; /** * Adds a mentionable option * * @param input A function that returns an option builder, or an already built builder */ addMentionableOption(input: SlashCommandMentionableOption): this; /** * Adds a string option * * @param input A function that returns an option builder, or an already built builder */ addStringOption(input: SlashCommandStringOption | Omit | Omit): this; /** * Adds an integer option * * @param input A function that returns an option builder, or an already built builder */ addIntegerOption(input: SlashCommandIntegerOption | Omit | Omit): this; /** * Adds a number option * * @param input A function that returns an option builder, or an already built builder */ addNumberOption(input: SlashCommandNumberOption | Omit | Omit): this; toJSON(): SlashCommandData; } export const PermissionBits: { CREATE_INSTANT_INVITE: bigint; KICK_MEMBERS: bigint; BAN_MEMBERS: bigint; ADMINISTRATOR: bigint; MANAGE_CHANNELS: bigint; MANAGE_GUILD: bigint; ADD_REACTIONS: bigint; VIEW_AUDIT_LOG: bigint; PRIORITY_SPEAKER: bigint; STREAM: bigint; VIEW_CHANNEL: bigint; SEND_MESSAGES: bigint; SEND_TTS_MESSAGES: bigint; MANAGE_MESSAGES: bigint; EMBED_LINKS: bigint; ATTACH_FILES: bigint; READ_MESSAGE_HISTORY: bigint; MENTION_EVERYONE: bigint; USE_EXTERNAL_EMOJIS: bigint; VIEW_GUILD_INSIGHTS: bigint; CONNECT: bigint; SPEAK: bigint; MUTE_MEMBERS: bigint; DEAFEN_MEMBERS: bigint; MOVE_MEMBERS: bigint; USE_VAD: bigint; CHANGE_NICKNAME: bigint; MANAGE_NICKNAMES: bigint; MANAGE_ROLES: bigint; MANAGE_WEBHOOKS: bigint; MANAGE_EMOJIS_AND_STICKERS: bigint; USE_APPLICATION_COMMANDS: bigint; REQUEST_TO_SPEAK: bigint; MANAGE_EVENTS: bigint; MANAGE_THREADS: bigint; CREATE_PUBLIC_THREADS: bigint; CREATE_PRIVATE_THREADS: bigint; USE_EXTERNAL_STICKERS: bigint; SEND_MESSAGES_IN_THREADS: bigint; START_EMBEDDED_ACTIVITIES: bigint; MODERATE_MEMBERS: bigint; }; export type CommandData = SlashCommandData | CommandGroupData | UserCommandData | MessageCommandData; export type CommandBuilder = SlashCommandBuilder | CommandGroupBuilder | UserCommandBuilder | MessageCommandBuilder; export type AnyAPIActionRowComponent = APIActionRowComponentTypes | APIActionRowComponent; export abstract class ComponentBuilderBase> = APIBaseComponent> { /** * The API data associated with this component */ readonly data: Partial; abstract toJSON(): AnyAPIActionRowComponent; constructor(data: Partial); } export enum ButtonStyle { Primary = 1, Secondary = 2, Success = 3, Danger = 4, Link = 5 } export abstract class ButtonBuilderBase extends ComponentBuilderBase { constructor(data?: Partial | ButtonStyle, label?: string); /** * Sets the style of this button * @param style The style of the button */ setStyle(style: ButtonStyle): this; /** * Sets the emoji to display on this button * @param emoji The emoji to display on this button */ setEmoji(emoji: APIMessageComponentEmoji): this; /** * Sets whether this button is disable or not * @param disabled Whether or not to disable this button or not */ setDisabled(disabled?: boolean): this; /** * Sets the label for this button * @param label The label to display on this button */ setLabel(label: string): this; toJSON(): APIButtonComponent; } /** * Represents a non-validated button component */ export class ButtonBuilder extends ButtonBuilderBase { /** * Sets the custom Id for this button * @param customId The custom id to use for this button */ setCustomId(customId: string): this; toJSON(): APIButtonComponentWithCustomId; } export class LinkButtonBuilder extends ButtonBuilderBase { /** * Sets the URL for this button * @param url The URL to open when this button is clicked */ setURL(url: string): this; toJSON(): APIButtonComponentWithURL; } /** * Represents a non-validated option within a select menu component */ export class SelectMenuOptionBuilder { data: Partial; constructor(data?: Partial); /** * Sets the label of this option * @param label The label to show on this option */ setLabel(label: string): this; /** * Sets the value of this option * @param value The value of this option */ setValue(value: string): this; /** * Sets the description of this option. * @param description The description of this option */ setDescription(description: string): this; /** * Sets whether this option is selected by default * @param isDefault Whether this option is selected by default */ setDefault(isDefault?: boolean): this; /** * Sets the emoji to display on this option * @param emoji The emoji to display on this option */ setEmoji(emoji: APIMessageComponentEmoji): this; toJSON(): APISelectMenuOption; } /** * Represents a non-validated select menu component */ export class SelectMenuBuilder extends ComponentBuilderBase { /** * The options within this select menu */ readonly options: SelectMenuOptionBuilder[]; constructor(data?: Partial); /** * Sets the placeholder for this select menu * @param placeholder The placeholder to use for this select menu */ setPlaceholder(placeholder: string): this; /** * Sets the minimum values that must be selected in the select menu * @param minValues The minimum values that must be selected */ setMinValues(minValues: number): this; /** * Sets the maximum values that must be selected in the select menu * @param minValues The maximum values that must be selected */ setMaxValues(maxValues: number): this; /** * Sets the custom Id for this select menu * @param customId The custom id to use for this select menu */ setCustomId(customId: string): this; /** * Sets whether or not this select menu is disabled * @param disabled Whether or not this select menu is disabled */ setDisabled(disabled?: boolean): this; /** * Adds options to this select menu * @param options The options to add to this select menu * @returns */ addOptions(...options: SelectMenuOptionBuilder[]): this; /** * Sets the options on this select menu * @param options The options to set on this select menu */ setOptions(options: (SelectMenuOptionBuilder | APISelectMenuOption)[]): this; toJSON(): APISelectMenuComponent; } export enum TextInputStyle { Short = 1, Paragraph = 2 } /** * Represents a non-validated text input component */ export class TextInputBuilder extends ComponentBuilderBase { constructor(id: string, label: string, style: TextInputStyle); /** * Sets the placeholder for this text input * @param placeholder The placeholder to use for this text input */ setPlaceholder(placeholder: string): this; /** * Sets a prefilled value for the text input * @param value Text to fill with */ setValue(value: string): this; /** * Sets the label for this button * @param label The label to display on this button */ setLabel(label: string): this; /** * Sets the style of this button * @param style The style of the button */ setStyle(style: TextInputStyle): this; /** * Sets the minimum values that must be selected in the text input * @param minValues The minimum values that must be selected */ setMinLength(minLength: number): this; /** * Sets the maximum values that must be selected in the text input * @param minValues The maximum values that must be selected */ setMaxLength(maxLength: number): this; /** * Sets the custom Id for this text input * @param customId The custom id to use for this text input */ setCustomId(customId: string): this; /** * Sets whether or not this text input is required * @param disabled Whether or not this text input is required - Default: true */ setRequired(required?: boolean): this; toJSON(): APITextInputComponent; } export type MessageActionRowComponentBuilders = ButtonBuilder | SelectMenuBuilder; export type ModalActionRowComponentBuilders = TextInputBuilder; export type ComponentBuilders = MessageActionRowComponentBuilders | ModalActionRowComponentBuilders; export type MessageActionRowBuilder = ActionRowBuilder; export type ModalActionRowBuilder = ActionRowBuilder; /** * Represents an action row component */ export class ActionRowBuilder extends ComponentBuilderBase> { /** * The components within this action row */ readonly components: T[]; constructor(components?: T[]); /** * Adds components to this action row. * @param components The components to add to this action row. * @returns */ addComponents(...components: T[]): this; /** * Sets the components in this action row * @param components The components to set this row to */ setComponents(components: T[]): this; toJSON(): APIActionRowComponent>; } export type RGBTuple = [ red: number, green: number, blue: number ]; export interface IconData { /** * The URL of the icon */ iconURL?: string; /** * The proxy URL of the icon */ proxyIconURL?: string; } export type EmbedAuthorData = Omit & IconData; export type EmbedAuthorOptions = Omit; export type EmbedFooterData = Omit & IconData; export type EmbedFooterOptions = Omit; export interface EmbedImageData extends Omit { /** * The proxy URL for the image */ proxyURL?: string; } /** * Represents a non-validated embed in a message (image/video preview, rich embed, etc.) */ export class EmbedBuilder { readonly data: APIEmbed; constructor(data?: string | APIEmbed, description?: string); /** * Adds fields to the embed (max 25) * * @param fields The fields to add */ addFields(...fields: APIEmbedField[]): this; /** * Removes, replaces, or inserts fields in the embed (max 25) * * @param index The index to start at * @param deleteCount The number of fields to remove * @param fields The replacing field objects */ spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this; /** * Sets the embed's fields (max 25). * @param fields The fields to set */ setFields(fields: APIEmbedField[]): this; /** * Sets the author of this embed * * @param options The options for the author */ setAuthor(options: EmbedAuthorOptions | null): this; /** * Sets the color of this embed * * @param color The color of the embed */ setColor(color: number | RGBTuple | null): this; /** * Sets the description of this embed * * @param description The description */ setDescription(description: string | null): this; /** * Sets the footer of this embed * * @param options The options for the footer */ setFooter(options: EmbedFooterOptions | null): this; /** * Sets the image of this embed * * @param url The URL of the image */ setImage(url: string | null): this; /** * Sets the thumbnail of this embed * * @param url The URL of the thumbnail */ setThumbnail(url: string | null): this; /** * Sets the timestamp of this embed * * @param timestamp The timestamp or date */ setTimestamp(timestamp?: number | Date | null): this; /** * Sets the title of this embed * * @param title The title */ setTitle(title: string | null): this; /** * Sets the URL of this embed * * @param url The URL */ setURL(url: string | null): this; /** * Transforms the embed to a plain object */ toJSON(): APIEmbed; } export interface AttachedFile { name?: string; description?: string; data: Uint8Array | Blob | string; } export class MessageBuilder { data: APIInteractionResponseCallbackData; files?: AttachedFile[]; constructor(data?: string | EmbedBuilder | APIInteractionResponseCallbackData); /** * Sets the content of the message. * @param content Text content for your message. * @returns */ setContent(content: string): this; /** * Set whether to enable TTS for this message. * @param tts Whether or not the message should be read aloud. * @returns */ setTts(tts: boolean): this; /** * Set which mentions will be allowed in this message. * @param allowedMentions Allowed mentions for this message. https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mentions-structure - TODO: Builder for this * @returns */ setAllowedMentions(allowedMentions: APIAllowedMentions): this; private setMessageFlag; /** * Set the SuppressEmbeds flag on this messgae. * @param value Whether or not embeds in this message should be suppressed (hidden). * @returns */ suppressEmbeds(value: boolean): this; /** * Set the Ephemeral flag on this message. https://discord.com/developers/docs/tutorials/upgrading-to-application-commands#responding-to-a-command * @param value Whether or not the message should be ephemeral. * @returns */ setEphemeral(value: boolean): this; /** * Add one or more embeds to this message. Maximum of 10. * @param embeds Embeds to add to this message. * @returns */ addEmbeds(...embeds: EmbedBuilder[]): this; /** * Set an array of embeds to be sent with this message. * @param embeds Array of embeds to be sent. * @returns */ setEmbeds(...embeds: EmbedBuilder[]): this; /** * Add one or more Action Rows to the message. Maximum of 5. * @param components Action Rows to add to this message. * @returns */ addComponents(...components: ActionRowBuilder[]): this; /** * Set an array of Action Rows to be sent with this message. * @param components Array of Action Rows to be sent. * @returns */ setComponents(components?: APIActionRowComponent[]): this; /** * Add one or more files to this message. * @param files Files to attach to this message. * @returns */ addAttachments(...files: AttachedFile[]): this; /** * Set an array of files to be sent with this message. * @param files Array of files to be sent. * @returns **/ setAttachments(...files: AttachedFile[]): this; /** * Fetch this message's files and data as a FormData object. * @param data Data to be included as the `payload_json` property. * @returns */ private toFormData; /** * Fetch this message's data as an HTTP interaction response. * @param responseType The interaction response type, depending on whether this is a response to a message or a reaction. * @returns */ toInteractionJSON(responseType: T): ResponseMap[T]; /** * Fetch this message and its files as an HTTP interaction response. * @param responseType The interaction response type, depending on whether this is a response to a message or a reaction. * @returns */ toInteractionResponse(responseType: T): ResponseMap[T] | FormData; /** * Fetch this message's data as an object. */ toJSON(): APIInteractionResponseCallbackData; toWebhook(username?: string, avatar_url?: string): RESTPostAPIWebhookWithTokenJSONBody | FormData; } export type ResponseMap = { [InteractionResponseType.ChannelMessageWithSource]: APIInteractionResponseChannelMessageWithSource; [InteractionResponseType.UpdateMessage]: APIInteractionResponseUpdateMessage; }; export class ModalBuilder { data: Partial; constructor(data?: APIModalInteractionResponseCallbackData | string); setTitle(title: string): this; addComponents(...components: ActionRowBuilder[]): this; setComponents(components?: APIActionRowComponent[]): this; toJSON(): APIModalInteractionResponseCallbackData; } export {}; }