@discordjs/builders 0.13.0-dev.1648515278-ac4bc3a → 0.13.0-dev.1649030892-5748dbe

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -649,7 +649,7 @@ declare class ActionRowBuilder<T extends MessageActionRowComponentBuilder | Moda
649
649
  /**
650
650
  * The components within this action row
651
651
  */
652
- private readonly components;
652
+ readonly components: T[];
653
653
  constructor({ components, ...data }?: Partial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>>);
654
654
  /**
655
655
  * Adds components to this action row.
@@ -822,7 +822,7 @@ declare namespace Assertions$3 {
822
822
  }
823
823
 
824
824
  declare class UnsafeModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {
825
- protected readonly data: Partial<Omit<APIModalInteractionResponseCallbackData, 'components'>>;
825
+ readonly data: Partial<Omit<APIModalInteractionResponseCallbackData, 'components'>>;
826
826
  readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[];
827
827
  constructor({ components, ...data }?: Partial<APIModalInteractionResponseCallbackData>);
828
828
  /**
@@ -877,7 +877,7 @@ declare class UnsafeSelectMenuBuilder extends ComponentBuilder<Partial<Omit<APIS
877
877
  /**
878
878
  * The options within this select menu
879
879
  */
880
- protected readonly options: UnsafeSelectMenuOptionBuilder[];
880
+ readonly options: UnsafeSelectMenuOptionBuilder[];
881
881
  constructor(data?: Partial<APISelectMenuComponent>);
882
882
  /**
883
883
  * Sets the placeholder for this select menu
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/messages/embed/Assertions.ts","../src/messages/embed/UnsafeEmbed.ts","../src/messages/embed/Embed.ts","../src/messages/formatters.ts","../src/components/Assertions.ts","../src/components/selectMenu/UnsafeSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/UnsafeButton.ts","../src/components/button/Button.ts","../src/components/textInput/Assertions.ts","../src/components/textInput/UnsafeTextInput.ts","../src/components/textInput/TextInput.ts","../src/interactions/modals/UnsafeModal.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/components/selectMenu/UnsafeSelectMenu.ts","../src/components/selectMenu/SelectMenu.ts","../src/components/selectMenu/SelectMenuOption.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/jsonEncodable.ts","../src/util/equatable.ts","../src/util/componentUtil.ts"],"sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions';\nexport * from './messages/embed/Embed';\nexport * from './messages/formatters';\nexport * from './messages/embed/UnsafeEmbed';\n\nexport * as ComponentAssertions from './components/Assertions';\nexport * from './components/ActionRow';\nexport * from './components/button/Button';\nexport * from './components/Component';\nexport * from './components/Components';\nexport * from './components/textInput/TextInput';\nexport * as TextInputAssertions from './components/textInput/Assertions';\nexport * from './components/textInput/UnsafeTextInput';\nexport * from './interactions/modals/UnsafeModal';\nexport * from './interactions/modals/Modal';\nexport * as ModalAssertions from './interactions/modals/Assertions';\nexport * from './components/selectMenu/SelectMenu';\nexport * from './components/selectMenu/SelectMenuOption';\nexport * from './components/button/UnsafeButton';\nexport * from './components/selectMenu/UnsafeSelectMenu';\nexport * from './components/selectMenu/UnsafeSelectMenuOption';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions';\nexport * from './interactions/slashCommands/SlashCommandBuilder';\nexport * from './interactions/slashCommands/SlashCommandSubcommands';\nexport * from './interactions/slashCommands/options/boolean';\nexport * from './interactions/slashCommands/options/channel';\nexport * from './interactions/slashCommands/options/integer';\nexport * from './interactions/slashCommands/options/mentionable';\nexport * from './interactions/slashCommands/options/number';\nexport * from './interactions/slashCommands/options/role';\nexport * from './interactions/slashCommands/options/attachment';\nexport * from './interactions/slashCommands/options/string';\nexport * from './interactions/slashCommands/options/user';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder';\n\nexport * from './util/jsonEncodable';\nexport * from './util/equatable';\nexport * from './util/componentUtil';\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport { z } from 'zod';\n\nexport const fieldNamePredicate = z.string().min(1).max(256);\n\nexport const fieldValuePredicate = z.string().min(1).max(1024);\n\nexport const fieldInlinePredicate = z.boolean().optional();\n\nexport const embedFieldPredicate = z.object({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array();\n\nexport const fieldLengthPredicate = z.number().lte(25);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable();\n\nexport const urlPredicate = z.string().url().nullish();\n\nexport const RGBPredicate = z.number().int().gte(0).lte(255);\nexport const colorPredicate = z\n\t.number()\n\t.int()\n\t.gte(0)\n\t.lte(0xffffff)\n\t.nullable()\n\t.or(z.tuple([RGBPredicate, RGBPredicate, RGBPredicate]));\n\nexport const descriptionPredicate = z.string().min(1).max(4096).nullable();\n\nexport const footerTextPredicate = z.string().min(1).max(2048).nullable();\n\nexport const timestampPredicate = z.union([z.number(), z.date()]).nullable();\n\nexport const titlePredicate = fieldNamePredicate.nullable();\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\n\nexport type RGBTuple = [red: number, green: number, blue: number];\n\nexport interface IconData {\n\t/**\n\t * The URL of the icon\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon\n\t */\n\tproxyIconURL?: string;\n}\n\nexport type EmbedAuthorData = Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;\n\nexport type EmbedFooterData = Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;\n\nexport interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {\n\t/**\n\t * The proxy URL for the image\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * Represents a non-validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class UnsafeEmbedBuilder {\n\tpublic readonly data: APIEmbed;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25)\n\t *\n\t * @param fields The fields to add\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.push(...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25)\n\t *\n\t * @param index The index to start at\n\t * @param deleteCount The number of fields to remove\n\t * @param fields The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the embed's fields (max 25).\n\t * @param fields The fields to set\n\t */\n\tpublic setFields(...fields: APIEmbedField[]) {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...fields);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed\n\t *\n\t * @param options The options for the author\n\t */\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed\n\t *\n\t * @param color The color of the embed\n\t */\n\tpublic setColor(color: number | RGBTuple | null): this {\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed\n\t *\n\t * @param options The options for the footer\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed\n\t *\n\t * @param url The URL of the image\n\t */\n\tpublic setImage(url: string | null): this {\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed\n\t *\n\t * @param url The URL of the thumbnail\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed\n\t *\n\t * @param timestamp The timestamp or date\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed\n\t *\n\t * @param title The title\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed\n\t *\n\t * @param url The URL\n\t */\n\tpublic setURL(url: string | null): this {\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\nimport { EmbedAuthorOptions, EmbedFooterOptions, RGBTuple, UnsafeEmbedBuilder } from './UnsafeEmbed';\n\n/**\n * Represents a validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class EmbedBuilder extends UnsafeEmbedBuilder {\n\tpublic override addFields(...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.addFields(...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.spliceFields(index, deleteCount, ...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setAuthor(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tauthorNamePredicate.parse(options.name);\n\t\turlPredicate.parse(options.iconURL);\n\t\turlPredicate.parse(options.url);\n\n\t\treturn super.setAuthor(options);\n\t}\n\n\tpublic override setColor(color: number | RGBTuple | null): this {\n\t\t// Data assertions\n\t\treturn super.setColor(colorPredicate.parse(color));\n\t}\n\n\tpublic override setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setDescription(descriptionPredicate.parse(description));\n\t}\n\n\tpublic override setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setFooter(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tfooterTextPredicate.parse(options.text);\n\t\turlPredicate.parse(options.iconURL);\n\n\t\treturn super.setFooter(options);\n\t}\n\n\tpublic override setImage(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setImage(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setThumbnail(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\treturn super.setTimestamp(timestampPredicate.parse(timestamp));\n\t}\n\n\tpublic override setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setTitle(titlePredicate.parse(title));\n\t}\n\n\tpublic override setURL(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setURL(urlPredicate.parse(url)!);\n\t}\n}\n","import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @param content The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @param language The language for the codeblock\n * @param content The content to wrap\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code\n *\n * @param content The content to wrap\n */\nexport function inlineCode<C extends string>(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text\n *\n * @param content The content to wrap\n */\nexport function italic<C extends string>(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text\n *\n * @param content The content to wrap\n */\nexport function bold<C extends string>(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text\n *\n * @param content The content to wrap\n */\nexport function underscore<C extends string>(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text\n *\n * @param content The content to wrap\n */\nexport function strikethrough<C extends string>(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function quote<C extends string>(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function blockQuote<C extends string>(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed<C extends string>(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, T extends string>(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, U extends string, T extends string>(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text)\n *\n * @param content The content to wrap\n */\nexport function spoiler<C extends string>(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention\n *\n * @param userId The user ID to format\n */\nexport function userMention<C extends Snowflake>(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention\n *\n * @param memberId The user ID to format\n */\nexport function memberNicknameMention<C extends Snowflake>(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention\n *\n * @param channelId The channel ID to format\n */\nexport function channelMention<C extends Snowflake>(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention\n *\n * @param roleId The role ID to format\n */\nexport function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated = false): `<a:_:${C}>` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string\n *\n * @param date The date to format, defaults to the current time\n */\nexport function time(date?: Date): `<t:${bigint}>`;\n\n/**\n * Formats a date given a format style\n *\n * @param date The date to format\n * @param style The style to use\n */\nexport function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n */\nexport function time<C extends number>(seconds: C): `<t:${C}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n * @param style The style to use\n */\nexport function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * ¯\\\\_(ツ)\\\\_/¯\n\t */\n\tShrug = '¯\\\\_(ツ)\\\\_/¯',\n\n\t/**\n\t * (╯°□°)╯︵ ┻━┻\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\n\t * ┬─┬ ノ( ゜-゜ノ)\n\t */\n\tUnflip = '┬─┬ ノ( ゜-゜ノ)',\n}\n","import { APIMessageComponentEmoji, ButtonStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { SelectMenuOptionBuilder } from './selectMenu/SelectMenuOption';\nimport { UnsafeSelectMenuOptionBuilder } from './selectMenu/UnsafeSelectMenuOption';\n\nexport const customIdValidator = z.string().min(1).max(100);\n\nexport const emojiValidator = z\n\t.object({\n\t\tid: z.string(),\n\t\tname: z.string(),\n\t\tanimated: z.boolean(),\n\t})\n\t.partial()\n\t.strict();\n\nexport const disabledValidator = z.boolean();\n\nexport const buttonLabelValidator = z.string().nonempty().max(80);\n\nexport const buttonStyleValidator = z.number().int().min(ButtonStyle.Primary).max(ButtonStyle.Link);\n\nexport const placeholderValidator = z.string().max(150);\nexport const minMaxValidator = z.number().int().min(0).max(25);\n\nexport const labelValueDescriptionValidator = z.string().min(1).max(100);\nexport const optionValidator = z.union([\n\tz.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional(),\n\t\temoji: emojiValidator.optional(),\n\t\tdefault: z.boolean().optional(),\n\t}),\n\tz.instanceof(UnsafeSelectMenuOptionBuilder),\n]);\nexport const optionsValidator = optionValidator.array().nonempty();\nexport const optionsLengthValidator = z.number().int().min(0).max(25);\n\nexport function validateRequiredSelectMenuParameters(options: SelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const labelValueValidator = z.string().min(1).max(100);\nexport const defaultValidator = z.boolean();\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueValidator.parse(label);\n\tlabelValueValidator.parse(value);\n}\n\nexport const urlValidator = z.string().url();\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\turl?: string,\n) {\n\tif (url && customId) {\n\t\tthrow new RangeError('URL and custom id are mutually exclusive');\n\t}\n\n\tif (!label && !emoji) {\n\t\tthrow new RangeError('Buttons must have a label and/or an emoji');\n\t}\n\n\tif (style === ButtonStyle.Link) {\n\t\tif (!url) {\n\t\t\tthrow new RangeError('Link buttons must have a url');\n\t\t}\n\t} else if (url) {\n\t\tthrow new RangeError('Non-link buttons cannot have a url');\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\n\n/**\n * Represents a non-validated option within a select menu component\n */\nexport class UnsafeSelectMenuOptionBuilder {\n\tpublic constructor(public data: Partial<APISelectMenuOption> = {}) {}\n\n\t/**\n\t * Sets the label of this option\n\t * @param label The label to show on this option\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this option\n\t * @param value The value of this option\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this option.\n\t * @param description The description of this option\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = description;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default\n\t * @param isDefault Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = isDefault;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this option\n\t * @param emoji The emoji to display on this option\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuOption {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","import {\n\ttype APIActionRowComponent,\n\tComponentType,\n\tAPIMessageActionRowComponent,\n\tAPIModalActionRowComponent,\n} from 'discord-api-types/v10';\nimport type { ButtonBuilder, SelectMenuBuilder, TextInputBuilder } from '..';\nimport { ComponentBuilder } from './Component';\nimport { createComponentBuilder } from './Components';\n\nexport type MessageComponentBuilder =\n\t| MessageActionRowComponentBuilder\n\t| ActionRowBuilder<MessageActionRowComponentBuilder>;\nexport type ModalComponentBuilder = ModalActionRowComponentBuilder | ActionRowBuilder<ModalActionRowComponentBuilder>;\n\nexport type MessageActionRowComponentBuilder = ButtonBuilder | SelectMenuBuilder;\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Represents an action row component\n */\nexport class ActionRowBuilder<\n\tT extends MessageActionRowComponentBuilder | ModalActionRowComponentBuilder =\n\t\t| MessageActionRowComponentBuilder\n\t\t| ModalActionRowComponentBuilder,\n> extends ComponentBuilder<\n\tOmit<\n\t\tPartial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> & {\n\t\t\ttype: ComponentType.ActionRow;\n\t\t},\n\t\t'components'\n\t>\n> {\n\t/**\n\t * The components within this action row\n\t */\n\tprivate readonly components: T[];\n\n\tpublic constructor({\n\t\tcomponents,\n\t\t...data\n\t}: Partial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ?? []) as T[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t * @param components The components to add to this action row.\n\t * @returns\n\t */\n\tpublic addComponents(...components: T[]) {\n\t\tthis.components.push(...components);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this action row\n\t * @param components The components to set this row to\n\t */\n\tpublic setComponents(...components: T[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()) as ReturnType<T['toJSON']>[],\n\t\t};\n\t}\n}\n","import type { JSONEncodable } from '../util/jsonEncodable';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tAPIMessageActionRowComponent,\n\tAPIMessageComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Represents a discord component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial<APIBaseComponent<ComponentType>> & {\n\t\ttype: ComponentType;\n\t} = APIBaseComponent<ComponentType>,\n> implements\n\t\tJSONEncodable<\n\t\t\t| APIModalComponent\n\t\t\t| APIMessageComponent\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>\n\t\t>\n{\n\t/**\n\t * The API data associated with this component\n\t */\n\tpublic readonly data: DataType;\n\n\tpublic abstract toJSON():\n\t\t| APIActionRowComponentTypes\n\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>;\n\n\tpublic constructor(data: DataType) {\n\t\tthis.data = data;\n\t}\n}\n","import { APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v10';\nimport { ActionRowBuilder, ButtonBuilder, ComponentBuilder, SelectMenuBuilder, TextInputBuilder } from '../index';\nimport type { MessageComponentBuilder, ModalComponentBuilder } from './ActionRow';\n\nexport interface MappedComponentTypes {\n\t[ComponentType.ActionRow]: ActionRowBuilder;\n\t[ComponentType.Button]: ButtonBuilder;\n\t[ComponentType.SelectMenu]: SelectMenuBuilder;\n\t[ComponentType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Factory for creating components from API data\n * @param data The api data to transform to a component class\n */\nexport function createComponentBuilder<T extends keyof MappedComponentTypes>(\n\tdata: (APIMessageComponent | APIModalComponent) & { type: T },\n): MappedComponentTypes[T];\nexport function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.SelectMenu:\n\t\t\treturn new SelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error\n\t\t\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\tButtonStyle,\n\ttype APIMessageComponentEmoji,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithURL,\n\ttype APIButtonComponentWithCustomId,\n} from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\n\n/**\n * Represents a non-validated button component\n */\nexport class UnsafeButtonBuilder extends ComponentBuilder<\n\tPartial<APIButtonComponent> & { type: ComponentType.Button }\n> {\n\tpublic constructor(data?: Partial<APIButtonComponent>) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button\n\t * @param style The style of the button\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button\n\t * @param url The URL to open when this button is clicked\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = url;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this button\n\t * @param customId The custom id to use for this button\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button\n\t * @param emoji The emoji to display on this button\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disable or not\n\t * @param disabled Whether or not to disable this button or not\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button\n\t * @param label The label to display on this button\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIButtonComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import type {\n\tButtonStyle,\n\tAPIMessageComponentEmoji,\n\tAPIButtonComponent,\n\tAPIButtonComponentWithCustomId,\n\tAPIButtonComponentWithURL,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions';\nimport { UnsafeButtonBuilder } from './UnsafeButton';\n\n/**\n * Represents a validated button component\n */\nexport class ButtonBuilder extends UnsafeButtonBuilder {\n\tpublic override setStyle(style: ButtonStyle) {\n\t\treturn super.setStyle(buttonStyleValidator.parse(style));\n\t}\n\n\tpublic override setURL(url: string) {\n\t\treturn super.setURL(urlValidator.parse(url));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override setLabel(label: string) {\n\t\treturn super.setLabel(buttonLabelValidator.parse(label));\n\t}\n\n\tpublic override toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\tthis.data.label,\n\t\t\tthis.data.emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\t\treturn super.toJSON();\n\t}\n}\n","import { TextInputStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { customIdValidator } from '../Assertions';\n\nexport const textInputStyleValidator = z.nativeEnum(TextInputStyle);\nexport const minLengthValidator = z.number().int().min(0).max(4000);\nexport const maxLengthValidator = z.number().int().min(1).max(4000);\nexport const requiredValidator = z.boolean();\nexport const valueValidator = z.string().max(4000);\nexport const placeholderValidator = z.string().max(100);\nexport const labelValidator = z.string().min(1).max(45);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../../index';\nimport isEqual from 'fast-deep-equal';\n\nexport class UnsafeTextInputBuilder extends ComponentBuilder<\n\tPartial<APITextInputComponent> & { type: ComponentType.TextInput }\n> {\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input\n\t * @param customId The custom id of this text inputå\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input\n\t * @param label The label for this text input\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input\n\t * @param style The style for this text input\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input\n\t * @param minLength The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input\n\t * @param maxLength The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder of this text input\n\t * @param placeholder The placeholder of this text input\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this text input\n\t * @param value The value for this text input\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required or not\n\t * @param required Whether this text input is required or not\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = required;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APITextInputComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\tpublic equals(other: UnsafeTextInputBuilder | APITextInputComponent): boolean {\n\t\tif (other instanceof UnsafeTextInputBuilder) {\n\t\t\treturn isEqual(other.data, this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import type { APITextInputComponent } from 'discord-api-types/v10';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { UnsafeTextInputBuilder } from './UnsafeTextInput';\n\nexport class TextInputBuilder extends UnsafeTextInputBuilder {\n\tpublic override setMinLength(minLength: number) {\n\t\treturn super.setMinLength(minLengthValidator.parse(minLength));\n\t}\n\n\tpublic override setMaxLength(maxLength: number) {\n\t\treturn super.setMaxLength(maxLengthValidator.parse(maxLength));\n\t}\n\n\tpublic override setRequired(required = true) {\n\t\treturn super.setRequired(requiredValidator.parse(required));\n\t}\n\n\tpublic override setValue(value: string) {\n\t\treturn super.setValue(valueValidator.parse(value));\n\t}\n\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\t\treturn super.toJSON();\n\t}\n}\n","import type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, createComponentBuilder, JSONEncodable, ModalActionRowComponentBuilder } from '../../index';\n\nexport class UnsafeModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {\n\tprotected readonly data: Partial<Omit<APIModalInteractionResponseCallbackData, 'components'>>;\n\tpublic readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[] = [];\n\n\tpublic constructor({ components, ...data }: Partial<APIModalInteractionResponseCallbackData> = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ??\n\t\t\t[]) as ActionRowBuilder<ModalActionRowComponentBuilder>[];\n\t}\n\n\t/**\n\t * Sets the title of the modal\n\t * @param title The title of the modal\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = title;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of the modal\n\t * @param customId The custom id of this modal\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal\n\t * @param components The components to add to this modal\n\t */\n\tpublic addComponents(\n\t\t...components: (\n\t\t\t| ActionRowBuilder<ModalActionRowComponentBuilder>\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent>\n\t\t)[]\n\t) {\n\t\tthis.components.push(\n\t\t\t...components.map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder<ModalActionRowComponentBuilder>(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this modal\n\t * @param components The components to set this modal to\n\t */\n\tpublic setComponents(...components: ActionRowBuilder<ModalActionRowComponentBuilder>[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { z } from 'zod';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../..';\nimport { customIdValidator } from '../../components/Assertions';\n\nexport const titleValidator = z.string().min(1).max(45);\nexport const componentsValidator = z.array(z.instanceof(ActionRowBuilder)).min(1);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder<ModalActionRowComponentBuilder>[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","import type { APIModalInteractionResponseCallbackData } from 'discord-api-types/v10';\nimport { customIdValidator } from '../../components/Assertions';\nimport { titleValidator, validateRequiredParameters } from './Assertions';\nimport { UnsafeModalBuilder } from './UnsafeModal';\n\nexport class ModalBuilder extends UnsafeModalBuilder {\n\tpublic override setCustomId(customId: string): this {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setTitle(title: string) {\n\t\treturn super.setTitle(titleValidator.parse(title));\n\t}\n\n\tpublic override toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\t\treturn super.toJSON();\n\t}\n}\n","import { APISelectMenuOption, ComponentType, type APISelectMenuComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a non-validated select menu component\n */\nexport class UnsafeSelectMenuBuilder extends ComponentBuilder<\n\tPartial<Omit<APISelectMenuComponent, 'options'>> & { type: ComponentType.SelectMenu }\n> {\n\t/**\n\t * The options within this select menu\n\t */\n\tprotected readonly options: UnsafeSelectMenuOptionBuilder[];\n\n\tpublic constructor(data?: Partial<APISelectMenuComponent>) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ type: ComponentType.SelectMenu, ...initData });\n\t\tthis.options = options?.map((o) => new UnsafeSelectMenuOptionBuilder(o)) ?? [];\n\t}\n\n\t/**\n\t * Sets the placeholder for this select menu\n\t * @param placeholder The placeholder to use for this select menu\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu\n\t * @param minValues The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu\n\t * @param minValues The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = maxValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this select menu\n\t * @param customId The custom id to use for this select menu\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether or not this select menu is disabled\n\t * @param disabled Whether or not this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds options to this select menu\n\t * @param options The options to add to this select menu\n\t * @returns\n\t */\n\tpublic addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options on this select menu\n\t * @param options The options to set on this select menu\n\t */\n\tpublic setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((o) => o.toJSON()),\n\t\t} as APISelectMenuComponent;\n\t}\n}\n","import type { APISelectMenuComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tcustomIdValidator,\n\tdisabledValidator,\n\tminMaxValidator,\n\toptionsLengthValidator,\n\toptionValidator,\n\tplaceholderValidator,\n\tvalidateRequiredSelectMenuParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuBuilder } from './UnsafeSelectMenu';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated select menu component\n */\nexport class SelectMenuBuilder extends UnsafeSelectMenuBuilder {\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override setMinValues(minValues: number) {\n\t\treturn super.setMinValues(minMaxValidator.parse(minValues));\n\t}\n\n\tpublic override setMaxValues(maxValues: number) {\n\t\treturn super.setMaxValues(minMaxValidator.parse(maxValues));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(this.options.length + options.length);\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(options.length);\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON(): APISelectMenuComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\t\treturn super.toJSON();\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated option within a select menu component\n */\nexport class SelectMenuOptionBuilder extends UnsafeSelectMenuOptionBuilder {\n\tpublic override setDescription(description: string) {\n\t\treturn super.setDescription(labelValueValidator.parse(description));\n\t}\n\n\tpublic override setDefault(isDefault = true) {\n\t\treturn super.setDefault(defaultValidator.parse(isDefault));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\t\treturn super.toJSON();\n\t}\n}\n","import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^[\\P{Lu}\\p{N}_-]+$/u);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = z.string().min(1).max(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = z.unknown().array().max(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = z.number().lte(25);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record<PropertyKey, unknown>;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n","import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t *\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick<SlashCommandBuilder, 'toJSON' | 'addSubcommand' | 'addSubcommandGroup'> {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick<SlashCommandBuilder, 'toJSON'> {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON: () => APIApplicationCommandOption;\n}\n","import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired } from '../Assertions';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Marks the option as required\n\t *\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin';\n\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { ChannelType } from 'discord-api-types/v10';\nimport { z, ZodLiteral } from 'zod';\n\n// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime)\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildNews,\n\tChannelType.GuildStore,\n\tChannelType.GuildNewsThread,\n\tChannelType.GuildPublicThread,\n\tChannelType.GuildPrivateThread,\n\tChannelType.GuildStageVoice,\n] as const;\n\nexport type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number];\n\nconst channelTypesPredicate = z.array(\n\tz.union(\n\t\tallowedChannelTypes.map((type) => z.literal(type)) as [\n\t\t\tZodLiteral<ChannelType>,\n\t\t\tZodLiteral<ChannelType>,\n\t\t\t...ZodLiteral<ChannelType>[]\n\t\t],\n\t),\n);\n\nexport class ApplicationCommandOptionChannelTypesMixin {\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option\n\t *\n\t * @param channelTypes The channel types to add\n\t */\n\tpublic addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tchannelTypesPredicate.parse(channelTypes);\n\n\t\tthis.channel_types!.push(...channelTypes);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number().int();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","export abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\tpublic readonly max_value?: number;\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option\n\t * @param max The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option\n\t * @param min The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { validateChoicesLength } from '../Assertions';\n\nconst stringPredicate = z.string().min(1).max(100);\nconst numberPredicate = z.number().gt(-Infinity).lt(Infinity);\nconst choicesPredicate = z\n\t.object({ name: stringPredicate, value: z.union([stringPredicate, numberPredicate]) })\n\t.array();\nconst booleanPredicate = z.boolean();\n\nexport class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends string | number> {\n\tpublic readonly choices?: APIApplicationCommandOptionChoice<T>[];\n\tpublic readonly autocomplete?: boolean;\n\n\t// Since this is present and this is a mixin, this is needed\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices for this option\n\t *\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(choices.length, this.choices);\n\n\t\tfor (const { name, value } of choices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(...choices);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Marks the option as autocompletable\n\t * @param autocomplete If this option should be autocompletable\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","import { APIApplicationCommandRoleOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandStringOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\n@mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {}\n","import { APIApplicationCommandUserOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandAttachmentOption } from '../options/attachment';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput:\n\t\t\t| SlashCommandStringOption\n\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandStringOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandStringOption\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput:\n\t\t\t| SlashCommandIntegerOption\n\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandIntegerOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandIntegerOption\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput:\n\t\t\t| SlashCommandNumberOption\n\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandNumberOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandNumberOption\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod<T extends ApplicationCommandOptionBase>(\n\t\tinput:\n\t\t\t| T\n\t\t\t| Omit<T, 'setAutocomplete'>\n\t\t\t| Omit<T, 'addChoices'>\n\t\t\t| ((builder: T) => T | Omit<T, 'setAutocomplete'> | Omit<T, 'addChoices'>),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n","import {\n\tAPIApplicationCommandSubcommandGroupOption,\n\tAPIApplicationCommandSubcommandOption,\n\tApplicationCommandOptionType,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {}\n","import { z } from 'zod';\nimport { ApplicationCommandType } from 'discord-api-types/v10';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^( *[\\p{L}\\p{N}_-]+ *)+$/u);\n\nconst typePredicate = z.union([z.literal(ApplicationCommandType.User), z.literal(ApplicationCommandType.Message)]);\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n","import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions';\nimport type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\n\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this context menu command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The type of this context menu command\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type\n\t *\n\t * @param type The type\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttype: this.type,\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n}\n\nexport type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message;\n","export interface JSONEncodable<T> {\n\t/**\n\t * Transforms this object to its JSON format\n\t */\n\ttoJSON: () => T;\n}\n\n/**\n * Indicates if an object is encodable or not.\n * @param maybeEncodable The object to check against\n */\nexport function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown> {\n\treturn maybeEncodable !== null && typeof maybeEncodable === 'object' && 'toJSON' in maybeEncodable;\n}\n","export interface Equatable<T> {\n\t/**\n\t * Whether or not this is equal to another structure\n\t */\n\tequals: (other: T) => boolean;\n}\n\n/**\n * Indicates if an object is equatable or not.\n * @param maybeEquatable The object to check against\n */\nexport function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown> {\n\treturn maybeEquatable !== null && typeof maybeEquatable === 'object' && 'equals' in maybeEquatable;\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAkB;AAEX,IAAM,qBAAqB,aAAE,SAAS,IAAI,GAAG,IAAI;AAEjD,IAAM,sBAAsB,aAAE,SAAS,IAAI,GAAG,IAAI;AAElD,IAAM,uBAAuB,aAAE,UAAU;AAEzC,IAAM,sBAAsB,aAAE,OAAO;AAAA,EAC3C,MAAM;A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AGb,eAAa;AAAA;AALE;;;ACvBT,sCAAgC;AAAA,EAAhC,cAHP;AAOiB;AAKA;AAOA;AAAA;AAAA,EAOT,QAAQ,MAAc;AAE5B,kBAAa;AAEb,YAAQ,IAAI,MAAM,QAAQ;AAE1B,WAAO;AAAA;AAAA,EAQD,QAAQ,MAA8B;AAE5C,iBAAa;AAEb,YAAQ,IAAI,MAAM,QAAQ;AAE1B,WAAO;AAAA;AAAA,EAYD,qBAAqB,OAAgB;AAE3C,+BAA0B;AAE1B,YAAQ,IAAI,MAAM,qBAAqB;AAEvC,WAAO;AAAA;AAAA,EAQD,SAAiD;AACvD,gCAA2B,KAAK,MAAM,KAAK;AAC3C,WAAO;AAAA,MACN,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,oBAAoB,KAAK;AAAA;AAAA;AAAA;AA1ErB;;;ACQA,yBAAyB,gBAAmE;AAClG,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AAAA;AADrE;;;ACAT,qBAAqB,gBAA+D;AAC1F,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AAAA;AADrE;;;ACTT,qBAAqB,MAAgB;AAC3C,SACE,MAAK,OAAO,UAAU,KACtB,MAAK,aAAa,UAAU,KAC5B,MAAK,QAAQ,OAAO,CAAC,MAAM,SAAS,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ,MAAM,KACvF,MAAK,QAAQ,KAAK,UAAU,KAC5B,MAAK,QAAQ,KAAK,UAAU;AAAA;AANf;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/messages/embed/Assertions.ts","../src/messages/embed/UnsafeEmbed.ts","../src/messages/embed/Embed.ts","../src/messages/formatters.ts","../src/components/Assertions.ts","../src/components/selectMenu/UnsafeSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/UnsafeButton.ts","../src/components/button/Button.ts","../src/components/textInput/Assertions.ts","../src/components/textInput/UnsafeTextInput.ts","../src/components/textInput/TextInput.ts","../src/interactions/modals/UnsafeModal.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/components/selectMenu/UnsafeSelectMenu.ts","../src/components/selectMenu/SelectMenu.ts","../src/components/selectMenu/SelectMenuOption.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/jsonEncodable.ts","../src/util/equatable.ts","../src/util/componentUtil.ts"],"sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions';\nexport * from './messages/embed/Embed';\nexport * from './messages/formatters';\nexport * from './messages/embed/UnsafeEmbed';\n\nexport * as ComponentAssertions from './components/Assertions';\nexport * from './components/ActionRow';\nexport * from './components/button/Button';\nexport * from './components/Component';\nexport * from './components/Components';\nexport * from './components/textInput/TextInput';\nexport * as TextInputAssertions from './components/textInput/Assertions';\nexport * from './components/textInput/UnsafeTextInput';\nexport * from './interactions/modals/UnsafeModal';\nexport * from './interactions/modals/Modal';\nexport * as ModalAssertions from './interactions/modals/Assertions';\nexport * from './components/selectMenu/SelectMenu';\nexport * from './components/selectMenu/SelectMenuOption';\nexport * from './components/button/UnsafeButton';\nexport * from './components/selectMenu/UnsafeSelectMenu';\nexport * from './components/selectMenu/UnsafeSelectMenuOption';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions';\nexport * from './interactions/slashCommands/SlashCommandBuilder';\nexport * from './interactions/slashCommands/SlashCommandSubcommands';\nexport * from './interactions/slashCommands/options/boolean';\nexport * from './interactions/slashCommands/options/channel';\nexport * from './interactions/slashCommands/options/integer';\nexport * from './interactions/slashCommands/options/mentionable';\nexport * from './interactions/slashCommands/options/number';\nexport * from './interactions/slashCommands/options/role';\nexport * from './interactions/slashCommands/options/attachment';\nexport * from './interactions/slashCommands/options/string';\nexport * from './interactions/slashCommands/options/user';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder';\n\nexport * from './util/jsonEncodable';\nexport * from './util/equatable';\nexport * from './util/componentUtil';\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport { z } from 'zod';\n\nexport const fieldNamePredicate = z.string().min(1).max(256);\n\nexport const fieldValuePredicate = z.string().min(1).max(1024);\n\nexport const fieldInlinePredicate = z.boolean().optional();\n\nexport const embedFieldPredicate = z.object({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array();\n\nexport const fieldLengthPredicate = z.number().lte(25);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable();\n\nexport const urlPredicate = z.string().url().nullish();\n\nexport const RGBPredicate = z.number().int().gte(0).lte(255);\nexport const colorPredicate = z\n\t.number()\n\t.int()\n\t.gte(0)\n\t.lte(0xffffff)\n\t.nullable()\n\t.or(z.tuple([RGBPredicate, RGBPredicate, RGBPredicate]));\n\nexport const descriptionPredicate = z.string().min(1).max(4096).nullable();\n\nexport const footerTextPredicate = z.string().min(1).max(2048).nullable();\n\nexport const timestampPredicate = z.union([z.number(), z.date()]).nullable();\n\nexport const titlePredicate = fieldNamePredicate.nullable();\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\n\nexport type RGBTuple = [red: number, green: number, blue: number];\n\nexport interface IconData {\n\t/**\n\t * The URL of the icon\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon\n\t */\n\tproxyIconURL?: string;\n}\n\nexport type EmbedAuthorData = Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;\n\nexport type EmbedFooterData = Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;\n\nexport interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {\n\t/**\n\t * The proxy URL for the image\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * Represents a non-validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class UnsafeEmbedBuilder {\n\tpublic readonly data: APIEmbed;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25)\n\t *\n\t * @param fields The fields to add\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.push(...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25)\n\t *\n\t * @param index The index to start at\n\t * @param deleteCount The number of fields to remove\n\t * @param fields The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the embed's fields (max 25).\n\t * @param fields The fields to set\n\t */\n\tpublic setFields(...fields: APIEmbedField[]) {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...fields);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed\n\t *\n\t * @param options The options for the author\n\t */\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed\n\t *\n\t * @param color The color of the embed\n\t */\n\tpublic setColor(color: number | RGBTuple | null): this {\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed\n\t *\n\t * @param options The options for the footer\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed\n\t *\n\t * @param url The URL of the image\n\t */\n\tpublic setImage(url: string | null): this {\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed\n\t *\n\t * @param url The URL of the thumbnail\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed\n\t *\n\t * @param timestamp The timestamp or date\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed\n\t *\n\t * @param title The title\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed\n\t *\n\t * @param url The URL\n\t */\n\tpublic setURL(url: string | null): this {\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\nimport { EmbedAuthorOptions, EmbedFooterOptions, RGBTuple, UnsafeEmbedBuilder } from './UnsafeEmbed';\n\n/**\n * Represents a validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class EmbedBuilder extends UnsafeEmbedBuilder {\n\tpublic override addFields(...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.addFields(...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.spliceFields(index, deleteCount, ...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setAuthor(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tauthorNamePredicate.parse(options.name);\n\t\turlPredicate.parse(options.iconURL);\n\t\turlPredicate.parse(options.url);\n\n\t\treturn super.setAuthor(options);\n\t}\n\n\tpublic override setColor(color: number | RGBTuple | null): this {\n\t\t// Data assertions\n\t\treturn super.setColor(colorPredicate.parse(color));\n\t}\n\n\tpublic override setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setDescription(descriptionPredicate.parse(description));\n\t}\n\n\tpublic override setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setFooter(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tfooterTextPredicate.parse(options.text);\n\t\turlPredicate.parse(options.iconURL);\n\n\t\treturn super.setFooter(options);\n\t}\n\n\tpublic override setImage(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setImage(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setThumbnail(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\treturn super.setTimestamp(timestampPredicate.parse(timestamp));\n\t}\n\n\tpublic override setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setTitle(titlePredicate.parse(title));\n\t}\n\n\tpublic override setURL(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setURL(urlPredicate.parse(url)!);\n\t}\n}\n","import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @param content The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @param language The language for the codeblock\n * @param content The content to wrap\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code\n *\n * @param content The content to wrap\n */\nexport function inlineCode<C extends string>(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text\n *\n * @param content The content to wrap\n */\nexport function italic<C extends string>(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text\n *\n * @param content The content to wrap\n */\nexport function bold<C extends string>(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text\n *\n * @param content The content to wrap\n */\nexport function underscore<C extends string>(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text\n *\n * @param content The content to wrap\n */\nexport function strikethrough<C extends string>(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function quote<C extends string>(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function blockQuote<C extends string>(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed<C extends string>(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, T extends string>(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, U extends string, T extends string>(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text)\n *\n * @param content The content to wrap\n */\nexport function spoiler<C extends string>(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention\n *\n * @param userId The user ID to format\n */\nexport function userMention<C extends Snowflake>(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention\n *\n * @param memberId The user ID to format\n */\nexport function memberNicknameMention<C extends Snowflake>(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention\n *\n * @param channelId The channel ID to format\n */\nexport function channelMention<C extends Snowflake>(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention\n *\n * @param roleId The role ID to format\n */\nexport function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated = false): `<a:_:${C}>` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string\n *\n * @param date The date to format, defaults to the current time\n */\nexport function time(date?: Date): `<t:${bigint}>`;\n\n/**\n * Formats a date given a format style\n *\n * @param date The date to format\n * @param style The style to use\n */\nexport function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n */\nexport function time<C extends number>(seconds: C): `<t:${C}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n * @param style The style to use\n */\nexport function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * ¯\\\\_(ツ)\\\\_/¯\n\t */\n\tShrug = '¯\\\\_(ツ)\\\\_/¯',\n\n\t/**\n\t * (╯°□°)╯︵ ┻━┻\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\n\t * ┬─┬ ノ( ゜-゜ノ)\n\t */\n\tUnflip = '┬─┬ ノ( ゜-゜ノ)',\n}\n","import { APIMessageComponentEmoji, ButtonStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { SelectMenuOptionBuilder } from './selectMenu/SelectMenuOption';\nimport { UnsafeSelectMenuOptionBuilder } from './selectMenu/UnsafeSelectMenuOption';\n\nexport const customIdValidator = z.string().min(1).max(100);\n\nexport const emojiValidator = z\n\t.object({\n\t\tid: z.string(),\n\t\tname: z.string(),\n\t\tanimated: z.boolean(),\n\t})\n\t.partial()\n\t.strict();\n\nexport const disabledValidator = z.boolean();\n\nexport const buttonLabelValidator = z.string().nonempty().max(80);\n\nexport const buttonStyleValidator = z.number().int().min(ButtonStyle.Primary).max(ButtonStyle.Link);\n\nexport const placeholderValidator = z.string().max(150);\nexport const minMaxValidator = z.number().int().min(0).max(25);\n\nexport const labelValueDescriptionValidator = z.string().min(1).max(100);\nexport const optionValidator = z.union([\n\tz.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional(),\n\t\temoji: emojiValidator.optional(),\n\t\tdefault: z.boolean().optional(),\n\t}),\n\tz.instanceof(UnsafeSelectMenuOptionBuilder),\n]);\nexport const optionsValidator = optionValidator.array().nonempty();\nexport const optionsLengthValidator = z.number().int().min(0).max(25);\n\nexport function validateRequiredSelectMenuParameters(options: SelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const labelValueValidator = z.string().min(1).max(100);\nexport const defaultValidator = z.boolean();\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueValidator.parse(label);\n\tlabelValueValidator.parse(value);\n}\n\nexport const urlValidator = z.string().url();\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\turl?: string,\n) {\n\tif (url && customId) {\n\t\tthrow new RangeError('URL and custom id are mutually exclusive');\n\t}\n\n\tif (!label && !emoji) {\n\t\tthrow new RangeError('Buttons must have a label and/or an emoji');\n\t}\n\n\tif (style === ButtonStyle.Link) {\n\t\tif (!url) {\n\t\t\tthrow new RangeError('Link buttons must have a url');\n\t\t}\n\t} else if (url) {\n\t\tthrow new RangeError('Non-link buttons cannot have a url');\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\n\n/**\n * Represents a non-validated option within a select menu component\n */\nexport class UnsafeSelectMenuOptionBuilder {\n\tpublic constructor(public data: Partial<APISelectMenuOption> = {}) {}\n\n\t/**\n\t * Sets the label of this option\n\t * @param label The label to show on this option\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this option\n\t * @param value The value of this option\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this option.\n\t * @param description The description of this option\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = description;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default\n\t * @param isDefault Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = isDefault;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this option\n\t * @param emoji The emoji to display on this option\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuOption {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","import {\n\ttype APIActionRowComponent,\n\tComponentType,\n\tAPIMessageActionRowComponent,\n\tAPIModalActionRowComponent,\n} from 'discord-api-types/v10';\nimport type { ButtonBuilder, SelectMenuBuilder, TextInputBuilder } from '..';\nimport { ComponentBuilder } from './Component';\nimport { createComponentBuilder } from './Components';\n\nexport type MessageComponentBuilder =\n\t| MessageActionRowComponentBuilder\n\t| ActionRowBuilder<MessageActionRowComponentBuilder>;\nexport type ModalComponentBuilder = ModalActionRowComponentBuilder | ActionRowBuilder<ModalActionRowComponentBuilder>;\n\nexport type MessageActionRowComponentBuilder = ButtonBuilder | SelectMenuBuilder;\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Represents an action row component\n */\nexport class ActionRowBuilder<\n\tT extends MessageActionRowComponentBuilder | ModalActionRowComponentBuilder =\n\t\t| MessageActionRowComponentBuilder\n\t\t| ModalActionRowComponentBuilder,\n> extends ComponentBuilder<\n\tOmit<\n\t\tPartial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> & {\n\t\t\ttype: ComponentType.ActionRow;\n\t\t},\n\t\t'components'\n\t>\n> {\n\t/**\n\t * The components within this action row\n\t */\n\tpublic readonly components: T[];\n\n\tpublic constructor({\n\t\tcomponents,\n\t\t...data\n\t}: Partial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ?? []) as T[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t * @param components The components to add to this action row.\n\t * @returns\n\t */\n\tpublic addComponents(...components: T[]) {\n\t\tthis.components.push(...components);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this action row\n\t * @param components The components to set this row to\n\t */\n\tpublic setComponents(...components: T[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()) as ReturnType<T['toJSON']>[],\n\t\t};\n\t}\n}\n","import type { JSONEncodable } from '../util/jsonEncodable';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tAPIMessageActionRowComponent,\n\tAPIMessageComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Represents a discord component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial<APIBaseComponent<ComponentType>> & {\n\t\ttype: ComponentType;\n\t} = APIBaseComponent<ComponentType>,\n> implements\n\t\tJSONEncodable<\n\t\t\t| APIModalComponent\n\t\t\t| APIMessageComponent\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>\n\t\t>\n{\n\t/**\n\t * The API data associated with this component\n\t */\n\tpublic readonly data: DataType;\n\n\tpublic abstract toJSON():\n\t\t| APIActionRowComponentTypes\n\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>;\n\n\tpublic constructor(data: DataType) {\n\t\tthis.data = data;\n\t}\n}\n","import { APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v10';\nimport { ActionRowBuilder, ButtonBuilder, ComponentBuilder, SelectMenuBuilder, TextInputBuilder } from '../index';\nimport type { MessageComponentBuilder, ModalComponentBuilder } from './ActionRow';\n\nexport interface MappedComponentTypes {\n\t[ComponentType.ActionRow]: ActionRowBuilder;\n\t[ComponentType.Button]: ButtonBuilder;\n\t[ComponentType.SelectMenu]: SelectMenuBuilder;\n\t[ComponentType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Factory for creating components from API data\n * @param data The api data to transform to a component class\n */\nexport function createComponentBuilder<T extends keyof MappedComponentTypes>(\n\tdata: (APIMessageComponent | APIModalComponent) & { type: T },\n): MappedComponentTypes[T];\nexport function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.SelectMenu:\n\t\t\treturn new SelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error\n\t\t\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\tButtonStyle,\n\ttype APIMessageComponentEmoji,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithURL,\n\ttype APIButtonComponentWithCustomId,\n} from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\n\n/**\n * Represents a non-validated button component\n */\nexport class UnsafeButtonBuilder extends ComponentBuilder<\n\tPartial<APIButtonComponent> & { type: ComponentType.Button }\n> {\n\tpublic constructor(data?: Partial<APIButtonComponent>) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button\n\t * @param style The style of the button\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button\n\t * @param url The URL to open when this button is clicked\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = url;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this button\n\t * @param customId The custom id to use for this button\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button\n\t * @param emoji The emoji to display on this button\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disable or not\n\t * @param disabled Whether or not to disable this button or not\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button\n\t * @param label The label to display on this button\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIButtonComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import type {\n\tButtonStyle,\n\tAPIMessageComponentEmoji,\n\tAPIButtonComponent,\n\tAPIButtonComponentWithCustomId,\n\tAPIButtonComponentWithURL,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions';\nimport { UnsafeButtonBuilder } from './UnsafeButton';\n\n/**\n * Represents a validated button component\n */\nexport class ButtonBuilder extends UnsafeButtonBuilder {\n\tpublic override setStyle(style: ButtonStyle) {\n\t\treturn super.setStyle(buttonStyleValidator.parse(style));\n\t}\n\n\tpublic override setURL(url: string) {\n\t\treturn super.setURL(urlValidator.parse(url));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override setLabel(label: string) {\n\t\treturn super.setLabel(buttonLabelValidator.parse(label));\n\t}\n\n\tpublic override toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\tthis.data.label,\n\t\t\tthis.data.emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\t\treturn super.toJSON();\n\t}\n}\n","import { TextInputStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { customIdValidator } from '../Assertions';\n\nexport const textInputStyleValidator = z.nativeEnum(TextInputStyle);\nexport const minLengthValidator = z.number().int().min(0).max(4000);\nexport const maxLengthValidator = z.number().int().min(1).max(4000);\nexport const requiredValidator = z.boolean();\nexport const valueValidator = z.string().max(4000);\nexport const placeholderValidator = z.string().max(100);\nexport const labelValidator = z.string().min(1).max(45);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../../index';\nimport isEqual from 'fast-deep-equal';\n\nexport class UnsafeTextInputBuilder extends ComponentBuilder<\n\tPartial<APITextInputComponent> & { type: ComponentType.TextInput }\n> {\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input\n\t * @param customId The custom id of this text inputå\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input\n\t * @param label The label for this text input\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input\n\t * @param style The style for this text input\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input\n\t * @param minLength The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input\n\t * @param maxLength The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder of this text input\n\t * @param placeholder The placeholder of this text input\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this text input\n\t * @param value The value for this text input\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required or not\n\t * @param required Whether this text input is required or not\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = required;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APITextInputComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\tpublic equals(other: UnsafeTextInputBuilder | APITextInputComponent): boolean {\n\t\tif (other instanceof UnsafeTextInputBuilder) {\n\t\t\treturn isEqual(other.data, this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import type { APITextInputComponent } from 'discord-api-types/v10';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { UnsafeTextInputBuilder } from './UnsafeTextInput';\n\nexport class TextInputBuilder extends UnsafeTextInputBuilder {\n\tpublic override setMinLength(minLength: number) {\n\t\treturn super.setMinLength(minLengthValidator.parse(minLength));\n\t}\n\n\tpublic override setMaxLength(maxLength: number) {\n\t\treturn super.setMaxLength(maxLengthValidator.parse(maxLength));\n\t}\n\n\tpublic override setRequired(required = true) {\n\t\treturn super.setRequired(requiredValidator.parse(required));\n\t}\n\n\tpublic override setValue(value: string) {\n\t\treturn super.setValue(valueValidator.parse(value));\n\t}\n\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\t\treturn super.toJSON();\n\t}\n}\n","import type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, createComponentBuilder, JSONEncodable, ModalActionRowComponentBuilder } from '../../index';\n\nexport class UnsafeModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {\n\tpublic readonly data: Partial<Omit<APIModalInteractionResponseCallbackData, 'components'>>;\n\tpublic readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[] = [];\n\n\tpublic constructor({ components, ...data }: Partial<APIModalInteractionResponseCallbackData> = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ??\n\t\t\t[]) as ActionRowBuilder<ModalActionRowComponentBuilder>[];\n\t}\n\n\t/**\n\t * Sets the title of the modal\n\t * @param title The title of the modal\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = title;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of the modal\n\t * @param customId The custom id of this modal\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal\n\t * @param components The components to add to this modal\n\t */\n\tpublic addComponents(\n\t\t...components: (\n\t\t\t| ActionRowBuilder<ModalActionRowComponentBuilder>\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent>\n\t\t)[]\n\t) {\n\t\tthis.components.push(\n\t\t\t...components.map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder<ModalActionRowComponentBuilder>(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this modal\n\t * @param components The components to set this modal to\n\t */\n\tpublic setComponents(...components: ActionRowBuilder<ModalActionRowComponentBuilder>[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { z } from 'zod';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../..';\nimport { customIdValidator } from '../../components/Assertions';\n\nexport const titleValidator = z.string().min(1).max(45);\nexport const componentsValidator = z.array(z.instanceof(ActionRowBuilder)).min(1);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder<ModalActionRowComponentBuilder>[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","import type { APIModalInteractionResponseCallbackData } from 'discord-api-types/v10';\nimport { customIdValidator } from '../../components/Assertions';\nimport { titleValidator, validateRequiredParameters } from './Assertions';\nimport { UnsafeModalBuilder } from './UnsafeModal';\n\nexport class ModalBuilder extends UnsafeModalBuilder {\n\tpublic override setCustomId(customId: string): this {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setTitle(title: string) {\n\t\treturn super.setTitle(titleValidator.parse(title));\n\t}\n\n\tpublic override toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\t\treturn super.toJSON();\n\t}\n}\n","import { APISelectMenuOption, ComponentType, type APISelectMenuComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a non-validated select menu component\n */\nexport class UnsafeSelectMenuBuilder extends ComponentBuilder<\n\tPartial<Omit<APISelectMenuComponent, 'options'>> & { type: ComponentType.SelectMenu }\n> {\n\t/**\n\t * The options within this select menu\n\t */\n\tpublic readonly options: UnsafeSelectMenuOptionBuilder[];\n\n\tpublic constructor(data?: Partial<APISelectMenuComponent>) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ type: ComponentType.SelectMenu, ...initData });\n\t\tthis.options = options?.map((o) => new UnsafeSelectMenuOptionBuilder(o)) ?? [];\n\t}\n\n\t/**\n\t * Sets the placeholder for this select menu\n\t * @param placeholder The placeholder to use for this select menu\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu\n\t * @param minValues The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu\n\t * @param minValues The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = maxValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this select menu\n\t * @param customId The custom id to use for this select menu\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether or not this select menu is disabled\n\t * @param disabled Whether or not this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds options to this select menu\n\t * @param options The options to add to this select menu\n\t * @returns\n\t */\n\tpublic addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options on this select menu\n\t * @param options The options to set on this select menu\n\t */\n\tpublic setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((o) => o.toJSON()),\n\t\t} as APISelectMenuComponent;\n\t}\n}\n","import type { APISelectMenuComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tcustomIdValidator,\n\tdisabledValidator,\n\tminMaxValidator,\n\toptionsLengthValidator,\n\toptionValidator,\n\tplaceholderValidator,\n\tvalidateRequiredSelectMenuParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuBuilder } from './UnsafeSelectMenu';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated select menu component\n */\nexport class SelectMenuBuilder extends UnsafeSelectMenuBuilder {\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override setMinValues(minValues: number) {\n\t\treturn super.setMinValues(minMaxValidator.parse(minValues));\n\t}\n\n\tpublic override setMaxValues(maxValues: number) {\n\t\treturn super.setMaxValues(minMaxValidator.parse(maxValues));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(this.options.length + options.length);\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(options.length);\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON(): APISelectMenuComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\t\treturn super.toJSON();\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated option within a select menu component\n */\nexport class SelectMenuOptionBuilder extends UnsafeSelectMenuOptionBuilder {\n\tpublic override setDescription(description: string) {\n\t\treturn super.setDescription(labelValueValidator.parse(description));\n\t}\n\n\tpublic override setDefault(isDefault = true) {\n\t\treturn super.setDefault(defaultValidator.parse(isDefault));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\t\treturn super.toJSON();\n\t}\n}\n","import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^[\\P{Lu}\\p{N}_-]+$/u);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = z.string().min(1).max(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = z.unknown().array().max(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = z.number().lte(25);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record<PropertyKey, unknown>;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n","import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t *\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick<SlashCommandBuilder, 'toJSON' | 'addSubcommand' | 'addSubcommandGroup'> {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick<SlashCommandBuilder, 'toJSON'> {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON: () => APIApplicationCommandOption;\n}\n","import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired } from '../Assertions';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Marks the option as required\n\t *\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin';\n\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { ChannelType } from 'discord-api-types/v10';\nimport { z, ZodLiteral } from 'zod';\n\n// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime)\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildNews,\n\tChannelType.GuildStore,\n\tChannelType.GuildNewsThread,\n\tChannelType.GuildPublicThread,\n\tChannelType.GuildPrivateThread,\n\tChannelType.GuildStageVoice,\n] as const;\n\nexport type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number];\n\nconst channelTypesPredicate = z.array(\n\tz.union(\n\t\tallowedChannelTypes.map((type) => z.literal(type)) as [\n\t\t\tZodLiteral<ChannelType>,\n\t\t\tZodLiteral<ChannelType>,\n\t\t\t...ZodLiteral<ChannelType>[]\n\t\t],\n\t),\n);\n\nexport class ApplicationCommandOptionChannelTypesMixin {\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option\n\t *\n\t * @param channelTypes The channel types to add\n\t */\n\tpublic addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tchannelTypesPredicate.parse(channelTypes);\n\n\t\tthis.channel_types!.push(...channelTypes);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number().int();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","export abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\tpublic readonly max_value?: number;\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option\n\t * @param max The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option\n\t * @param min The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { validateChoicesLength } from '../Assertions';\n\nconst stringPredicate = z.string().min(1).max(100);\nconst numberPredicate = z.number().gt(-Infinity).lt(Infinity);\nconst choicesPredicate = z\n\t.object({ name: stringPredicate, value: z.union([stringPredicate, numberPredicate]) })\n\t.array();\nconst booleanPredicate = z.boolean();\n\nexport class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends string | number> {\n\tpublic readonly choices?: APIApplicationCommandOptionChoice<T>[];\n\tpublic readonly autocomplete?: boolean;\n\n\t// Since this is present and this is a mixin, this is needed\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices for this option\n\t *\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(choices.length, this.choices);\n\n\t\tfor (const { name, value } of choices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(...choices);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Marks the option as autocompletable\n\t * @param autocomplete If this option should be autocompletable\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","import { APIApplicationCommandRoleOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandStringOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\n@mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {}\n","import { APIApplicationCommandUserOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandAttachmentOption } from '../options/attachment';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput:\n\t\t\t| SlashCommandStringOption\n\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandStringOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandStringOption\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput:\n\t\t\t| SlashCommandIntegerOption\n\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandIntegerOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandIntegerOption\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput:\n\t\t\t| SlashCommandNumberOption\n\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandNumberOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandNumberOption\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod<T extends ApplicationCommandOptionBase>(\n\t\tinput:\n\t\t\t| T\n\t\t\t| Omit<T, 'setAutocomplete'>\n\t\t\t| Omit<T, 'addChoices'>\n\t\t\t| ((builder: T) => T | Omit<T, 'setAutocomplete'> | Omit<T, 'addChoices'>),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n","import {\n\tAPIApplicationCommandSubcommandGroupOption,\n\tAPIApplicationCommandSubcommandOption,\n\tApplicationCommandOptionType,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {}\n","import { z } from 'zod';\nimport { ApplicationCommandType } from 'discord-api-types/v10';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^( *[\\p{L}\\p{N}_-]+ *)+$/u);\n\nconst typePredicate = z.union([z.literal(ApplicationCommandType.User), z.literal(ApplicationCommandType.Message)]);\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n","import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions';\nimport type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\n\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this context menu command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The type of this context menu command\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type\n\t *\n\t * @param type The type\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttype: this.type,\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n}\n\nexport type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message;\n","export interface JSONEncodable<T> {\n\t/**\n\t * Transforms this object to its JSON format\n\t */\n\ttoJSON: () => T;\n}\n\n/**\n * Indicates if an object is encodable or not.\n * @param maybeEncodable The object to check against\n */\nexport function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown> {\n\treturn maybeEncodable !== null && typeof maybeEncodable === 'object' && 'toJSON' in maybeEncodable;\n}\n","export interface Equatable<T> {\n\t/**\n\t * Whether or not this is equal to another structure\n\t */\n\tequals: (other: T) => boolean;\n}\n\n/**\n * Indicates if an object is equatable or not.\n * @param maybeEquatable The object to check against\n */\nexport function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown> {\n\treturn maybeEquatable !== null && typeof maybeEquatable === 'object' && 'equals' in maybeEquatable;\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,iBAAkB;AAEX,IAAM,qBAAqB,aAAE,SAAS,IAAI,GAAG,IAAI;AAEjD,IAAM,sBAAsB,aAAE,SAAS,IAAI,GAAG,IAAI;AAElD,IAAM,uBAAuB,aAAE,UAAU;AAEzC,IAAM,sBAAsB,aAAE,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;A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ALE;;;ACvBT,sCAAgC;AAAA,EAAhC,cAHP;AAOiB;AAKA;AAOA;AAAA;AAAA,EAOT,QAAQ,MAAc;AAE5B,kBAAa;AAEb,YAAQ,IAAI,MAAM,QAAQ;AAE1B,WAAO;AAAA;AAAA,EAQD,QAAQ,MAA8B;AAE5C,iBAAa;AAEb,YAAQ,IAAI,MAAM,QAAQ;AAE1B,WAAO;AAAA;AAAA,EAYD,qBAAqB,OAAgB;AAE3C,+BAA0B;AAE1B,YAAQ,IAAI,MAAM,qBAAqB;AAEvC,WAAO;AAAA;AAAA,EAQD,SAAiD;AACvD,gCAA2B,KAAK,MAAM,KAAK;AAC3C,WAAO;AAAA,MACN,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MACX,oBAAoB,KAAK;AAAA;AAAA;AAAA;AA1ErB;;;ACQA,yBAAyB,gBAAmE;AAClG,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AAAA;AADrE;;;ACAT,qBAAqB,gBAA+D;AAC1F,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AAAA;AADrE;;;ACTT,qBAAqB,MAAgB;AAC3C,SACE,MAAK,OAAO,UAAU,KACtB,MAAK,aAAa,UAAU,KAC5B,MAAK,QAAQ,OAAO,CAAC,MAAM,SAAS,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ,MAAM,KACvF,MAAK,QAAQ,KAAK,UAAU,KAC5B,MAAK,QAAQ,KAAK,UAAU;AAAA;AANf;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/messages/embed/Assertions.ts","../src/messages/embed/UnsafeEmbed.ts","../src/messages/embed/Embed.ts","../src/messages/formatters.ts","../src/components/Assertions.ts","../src/components/selectMenu/UnsafeSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/UnsafeButton.ts","../src/components/button/Button.ts","../src/components/textInput/Assertions.ts","../src/components/textInput/UnsafeTextInput.ts","../src/components/textInput/TextInput.ts","../src/interactions/modals/UnsafeModal.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/components/selectMenu/UnsafeSelectMenu.ts","../src/components/selectMenu/SelectMenu.ts","../src/components/selectMenu/SelectMenuOption.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/jsonEncodable.ts","../src/util/equatable.ts","../src/util/componentUtil.ts"],"sourcesContent":["import type { APIEmbedField } from 'discord-api-types/v10';\nimport { z } from 'zod';\n\nexport const fieldNamePredicate = z.string().min(1).max(256);\n\nexport const fieldValuePredicate = z.string().min(1).max(1024);\n\nexport const fieldInlinePredicate = z.boolean().optional();\n\nexport const embedFieldPredicate = z.object({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array();\n\nexport const fieldLengthPredicate = z.number().lte(25);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable();\n\nexport const urlPredicate = z.string().url().nullish();\n\nexport const RGBPredicate = z.number().int().gte(0).lte(255);\nexport const colorPredicate = z\n\t.number()\n\t.int()\n\t.gte(0)\n\t.lte(0xffffff)\n\t.nullable()\n\t.or(z.tuple([RGBPredicate, RGBPredicate, RGBPredicate]));\n\nexport const descriptionPredicate = z.string().min(1).max(4096).nullable();\n\nexport const footerTextPredicate = z.string().min(1).max(2048).nullable();\n\nexport const timestampPredicate = z.union([z.number(), z.date()]).nullable();\n\nexport const titlePredicate = fieldNamePredicate.nullable();\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\n\nexport type RGBTuple = [red: number, green: number, blue: number];\n\nexport interface IconData {\n\t/**\n\t * The URL of the icon\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon\n\t */\n\tproxyIconURL?: string;\n}\n\nexport type EmbedAuthorData = Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;\n\nexport type EmbedFooterData = Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;\n\nexport interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {\n\t/**\n\t * The proxy URL for the image\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * Represents a non-validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class UnsafeEmbedBuilder {\n\tpublic readonly data: APIEmbed;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25)\n\t *\n\t * @param fields The fields to add\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.push(...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25)\n\t *\n\t * @param index The index to start at\n\t * @param deleteCount The number of fields to remove\n\t * @param fields The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the embed's fields (max 25).\n\t * @param fields The fields to set\n\t */\n\tpublic setFields(...fields: APIEmbedField[]) {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...fields);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed\n\t *\n\t * @param options The options for the author\n\t */\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed\n\t *\n\t * @param color The color of the embed\n\t */\n\tpublic setColor(color: number | RGBTuple | null): this {\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed\n\t *\n\t * @param options The options for the footer\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed\n\t *\n\t * @param url The URL of the image\n\t */\n\tpublic setImage(url: string | null): this {\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed\n\t *\n\t * @param url The URL of the thumbnail\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed\n\t *\n\t * @param timestamp The timestamp or date\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed\n\t *\n\t * @param title The title\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed\n\t *\n\t * @param url The URL\n\t */\n\tpublic setURL(url: string | null): this {\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\nimport { EmbedAuthorOptions, EmbedFooterOptions, RGBTuple, UnsafeEmbedBuilder } from './UnsafeEmbed';\n\n/**\n * Represents a validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class EmbedBuilder extends UnsafeEmbedBuilder {\n\tpublic override addFields(...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.addFields(...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.spliceFields(index, deleteCount, ...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setAuthor(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tauthorNamePredicate.parse(options.name);\n\t\turlPredicate.parse(options.iconURL);\n\t\turlPredicate.parse(options.url);\n\n\t\treturn super.setAuthor(options);\n\t}\n\n\tpublic override setColor(color: number | RGBTuple | null): this {\n\t\t// Data assertions\n\t\treturn super.setColor(colorPredicate.parse(color));\n\t}\n\n\tpublic override setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setDescription(descriptionPredicate.parse(description));\n\t}\n\n\tpublic override setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setFooter(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tfooterTextPredicate.parse(options.text);\n\t\turlPredicate.parse(options.iconURL);\n\n\t\treturn super.setFooter(options);\n\t}\n\n\tpublic override setImage(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setImage(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setThumbnail(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\treturn super.setTimestamp(timestampPredicate.parse(timestamp));\n\t}\n\n\tpublic override setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setTitle(titlePredicate.parse(title));\n\t}\n\n\tpublic override setURL(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setURL(urlPredicate.parse(url)!);\n\t}\n}\n","import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @param content The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @param language The language for the codeblock\n * @param content The content to wrap\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code\n *\n * @param content The content to wrap\n */\nexport function inlineCode<C extends string>(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text\n *\n * @param content The content to wrap\n */\nexport function italic<C extends string>(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text\n *\n * @param content The content to wrap\n */\nexport function bold<C extends string>(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text\n *\n * @param content The content to wrap\n */\nexport function underscore<C extends string>(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text\n *\n * @param content The content to wrap\n */\nexport function strikethrough<C extends string>(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function quote<C extends string>(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function blockQuote<C extends string>(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed<C extends string>(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, T extends string>(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, U extends string, T extends string>(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text)\n *\n * @param content The content to wrap\n */\nexport function spoiler<C extends string>(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention\n *\n * @param userId The user ID to format\n */\nexport function userMention<C extends Snowflake>(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention\n *\n * @param memberId The user ID to format\n */\nexport function memberNicknameMention<C extends Snowflake>(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention\n *\n * @param channelId The channel ID to format\n */\nexport function channelMention<C extends Snowflake>(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention\n *\n * @param roleId The role ID to format\n */\nexport function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated = false): `<a:_:${C}>` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string\n *\n * @param date The date to format, defaults to the current time\n */\nexport function time(date?: Date): `<t:${bigint}>`;\n\n/**\n * Formats a date given a format style\n *\n * @param date The date to format\n * @param style The style to use\n */\nexport function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n */\nexport function time<C extends number>(seconds: C): `<t:${C}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n * @param style The style to use\n */\nexport function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * ¯\\\\_(ツ)\\\\_/¯\n\t */\n\tShrug = '¯\\\\_(ツ)\\\\_/¯',\n\n\t/**\n\t * (╯°□°)╯︵ ┻━┻\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\n\t * ┬─┬ ノ( ゜-゜ノ)\n\t */\n\tUnflip = '┬─┬ ノ( ゜-゜ノ)',\n}\n","import { APIMessageComponentEmoji, ButtonStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { SelectMenuOptionBuilder } from './selectMenu/SelectMenuOption';\nimport { UnsafeSelectMenuOptionBuilder } from './selectMenu/UnsafeSelectMenuOption';\n\nexport const customIdValidator = z.string().min(1).max(100);\n\nexport const emojiValidator = z\n\t.object({\n\t\tid: z.string(),\n\t\tname: z.string(),\n\t\tanimated: z.boolean(),\n\t})\n\t.partial()\n\t.strict();\n\nexport const disabledValidator = z.boolean();\n\nexport const buttonLabelValidator = z.string().nonempty().max(80);\n\nexport const buttonStyleValidator = z.number().int().min(ButtonStyle.Primary).max(ButtonStyle.Link);\n\nexport const placeholderValidator = z.string().max(150);\nexport const minMaxValidator = z.number().int().min(0).max(25);\n\nexport const labelValueDescriptionValidator = z.string().min(1).max(100);\nexport const optionValidator = z.union([\n\tz.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional(),\n\t\temoji: emojiValidator.optional(),\n\t\tdefault: z.boolean().optional(),\n\t}),\n\tz.instanceof(UnsafeSelectMenuOptionBuilder),\n]);\nexport const optionsValidator = optionValidator.array().nonempty();\nexport const optionsLengthValidator = z.number().int().min(0).max(25);\n\nexport function validateRequiredSelectMenuParameters(options: SelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const labelValueValidator = z.string().min(1).max(100);\nexport const defaultValidator = z.boolean();\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueValidator.parse(label);\n\tlabelValueValidator.parse(value);\n}\n\nexport const urlValidator = z.string().url();\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\turl?: string,\n) {\n\tif (url && customId) {\n\t\tthrow new RangeError('URL and custom id are mutually exclusive');\n\t}\n\n\tif (!label && !emoji) {\n\t\tthrow new RangeError('Buttons must have a label and/or an emoji');\n\t}\n\n\tif (style === ButtonStyle.Link) {\n\t\tif (!url) {\n\t\t\tthrow new RangeError('Link buttons must have a url');\n\t\t}\n\t} else if (url) {\n\t\tthrow new RangeError('Non-link buttons cannot have a url');\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\n\n/**\n * Represents a non-validated option within a select menu component\n */\nexport class UnsafeSelectMenuOptionBuilder {\n\tpublic constructor(public data: Partial<APISelectMenuOption> = {}) {}\n\n\t/**\n\t * Sets the label of this option\n\t * @param label The label to show on this option\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this option\n\t * @param value The value of this option\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this option.\n\t * @param description The description of this option\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = description;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default\n\t * @param isDefault Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = isDefault;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this option\n\t * @param emoji The emoji to display on this option\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuOption {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","import {\n\ttype APIActionRowComponent,\n\tComponentType,\n\tAPIMessageActionRowComponent,\n\tAPIModalActionRowComponent,\n} from 'discord-api-types/v10';\nimport type { ButtonBuilder, SelectMenuBuilder, TextInputBuilder } from '..';\nimport { ComponentBuilder } from './Component';\nimport { createComponentBuilder } from './Components';\n\nexport type MessageComponentBuilder =\n\t| MessageActionRowComponentBuilder\n\t| ActionRowBuilder<MessageActionRowComponentBuilder>;\nexport type ModalComponentBuilder = ModalActionRowComponentBuilder | ActionRowBuilder<ModalActionRowComponentBuilder>;\n\nexport type MessageActionRowComponentBuilder = ButtonBuilder | SelectMenuBuilder;\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Represents an action row component\n */\nexport class ActionRowBuilder<\n\tT extends MessageActionRowComponentBuilder | ModalActionRowComponentBuilder =\n\t\t| MessageActionRowComponentBuilder\n\t\t| ModalActionRowComponentBuilder,\n> extends ComponentBuilder<\n\tOmit<\n\t\tPartial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> & {\n\t\t\ttype: ComponentType.ActionRow;\n\t\t},\n\t\t'components'\n\t>\n> {\n\t/**\n\t * The components within this action row\n\t */\n\tprivate readonly components: T[];\n\n\tpublic constructor({\n\t\tcomponents,\n\t\t...data\n\t}: Partial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ?? []) as T[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t * @param components The components to add to this action row.\n\t * @returns\n\t */\n\tpublic addComponents(...components: T[]) {\n\t\tthis.components.push(...components);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this action row\n\t * @param components The components to set this row to\n\t */\n\tpublic setComponents(...components: T[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()) as ReturnType<T['toJSON']>[],\n\t\t};\n\t}\n}\n","import type { JSONEncodable } from '../util/jsonEncodable';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tAPIMessageActionRowComponent,\n\tAPIMessageComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Represents a discord component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial<APIBaseComponent<ComponentType>> & {\n\t\ttype: ComponentType;\n\t} = APIBaseComponent<ComponentType>,\n> implements\n\t\tJSONEncodable<\n\t\t\t| APIModalComponent\n\t\t\t| APIMessageComponent\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>\n\t\t>\n{\n\t/**\n\t * The API data associated with this component\n\t */\n\tpublic readonly data: DataType;\n\n\tpublic abstract toJSON():\n\t\t| APIActionRowComponentTypes\n\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>;\n\n\tpublic constructor(data: DataType) {\n\t\tthis.data = data;\n\t}\n}\n","import { APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v10';\nimport { ActionRowBuilder, ButtonBuilder, ComponentBuilder, SelectMenuBuilder, TextInputBuilder } from '../index';\nimport type { MessageComponentBuilder, ModalComponentBuilder } from './ActionRow';\n\nexport interface MappedComponentTypes {\n\t[ComponentType.ActionRow]: ActionRowBuilder;\n\t[ComponentType.Button]: ButtonBuilder;\n\t[ComponentType.SelectMenu]: SelectMenuBuilder;\n\t[ComponentType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Factory for creating components from API data\n * @param data The api data to transform to a component class\n */\nexport function createComponentBuilder<T extends keyof MappedComponentTypes>(\n\tdata: (APIMessageComponent | APIModalComponent) & { type: T },\n): MappedComponentTypes[T];\nexport function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.SelectMenu:\n\t\t\treturn new SelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error\n\t\t\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\tButtonStyle,\n\ttype APIMessageComponentEmoji,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithURL,\n\ttype APIButtonComponentWithCustomId,\n} from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\n\n/**\n * Represents a non-validated button component\n */\nexport class UnsafeButtonBuilder extends ComponentBuilder<\n\tPartial<APIButtonComponent> & { type: ComponentType.Button }\n> {\n\tpublic constructor(data?: Partial<APIButtonComponent>) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button\n\t * @param style The style of the button\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button\n\t * @param url The URL to open when this button is clicked\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = url;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this button\n\t * @param customId The custom id to use for this button\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button\n\t * @param emoji The emoji to display on this button\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disable or not\n\t * @param disabled Whether or not to disable this button or not\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button\n\t * @param label The label to display on this button\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIButtonComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import type {\n\tButtonStyle,\n\tAPIMessageComponentEmoji,\n\tAPIButtonComponent,\n\tAPIButtonComponentWithCustomId,\n\tAPIButtonComponentWithURL,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions';\nimport { UnsafeButtonBuilder } from './UnsafeButton';\n\n/**\n * Represents a validated button component\n */\nexport class ButtonBuilder extends UnsafeButtonBuilder {\n\tpublic override setStyle(style: ButtonStyle) {\n\t\treturn super.setStyle(buttonStyleValidator.parse(style));\n\t}\n\n\tpublic override setURL(url: string) {\n\t\treturn super.setURL(urlValidator.parse(url));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override setLabel(label: string) {\n\t\treturn super.setLabel(buttonLabelValidator.parse(label));\n\t}\n\n\tpublic override toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\tthis.data.label,\n\t\t\tthis.data.emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\t\treturn super.toJSON();\n\t}\n}\n","import { TextInputStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { customIdValidator } from '../Assertions';\n\nexport const textInputStyleValidator = z.nativeEnum(TextInputStyle);\nexport const minLengthValidator = z.number().int().min(0).max(4000);\nexport const maxLengthValidator = z.number().int().min(1).max(4000);\nexport const requiredValidator = z.boolean();\nexport const valueValidator = z.string().max(4000);\nexport const placeholderValidator = z.string().max(100);\nexport const labelValidator = z.string().min(1).max(45);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../../index';\nimport isEqual from 'fast-deep-equal';\n\nexport class UnsafeTextInputBuilder extends ComponentBuilder<\n\tPartial<APITextInputComponent> & { type: ComponentType.TextInput }\n> {\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input\n\t * @param customId The custom id of this text inputå\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input\n\t * @param label The label for this text input\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input\n\t * @param style The style for this text input\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input\n\t * @param minLength The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input\n\t * @param maxLength The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder of this text input\n\t * @param placeholder The placeholder of this text input\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this text input\n\t * @param value The value for this text input\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required or not\n\t * @param required Whether this text input is required or not\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = required;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APITextInputComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\tpublic equals(other: UnsafeTextInputBuilder | APITextInputComponent): boolean {\n\t\tif (other instanceof UnsafeTextInputBuilder) {\n\t\t\treturn isEqual(other.data, this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import type { APITextInputComponent } from 'discord-api-types/v10';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { UnsafeTextInputBuilder } from './UnsafeTextInput';\n\nexport class TextInputBuilder extends UnsafeTextInputBuilder {\n\tpublic override setMinLength(minLength: number) {\n\t\treturn super.setMinLength(minLengthValidator.parse(minLength));\n\t}\n\n\tpublic override setMaxLength(maxLength: number) {\n\t\treturn super.setMaxLength(maxLengthValidator.parse(maxLength));\n\t}\n\n\tpublic override setRequired(required = true) {\n\t\treturn super.setRequired(requiredValidator.parse(required));\n\t}\n\n\tpublic override setValue(value: string) {\n\t\treturn super.setValue(valueValidator.parse(value));\n\t}\n\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\t\treturn super.toJSON();\n\t}\n}\n","import type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, createComponentBuilder, JSONEncodable, ModalActionRowComponentBuilder } from '../../index';\n\nexport class UnsafeModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {\n\tprotected readonly data: Partial<Omit<APIModalInteractionResponseCallbackData, 'components'>>;\n\tpublic readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[] = [];\n\n\tpublic constructor({ components, ...data }: Partial<APIModalInteractionResponseCallbackData> = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ??\n\t\t\t[]) as ActionRowBuilder<ModalActionRowComponentBuilder>[];\n\t}\n\n\t/**\n\t * Sets the title of the modal\n\t * @param title The title of the modal\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = title;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of the modal\n\t * @param customId The custom id of this modal\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal\n\t * @param components The components to add to this modal\n\t */\n\tpublic addComponents(\n\t\t...components: (\n\t\t\t| ActionRowBuilder<ModalActionRowComponentBuilder>\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent>\n\t\t)[]\n\t) {\n\t\tthis.components.push(\n\t\t\t...components.map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder<ModalActionRowComponentBuilder>(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this modal\n\t * @param components The components to set this modal to\n\t */\n\tpublic setComponents(...components: ActionRowBuilder<ModalActionRowComponentBuilder>[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { z } from 'zod';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../..';\nimport { customIdValidator } from '../../components/Assertions';\n\nexport const titleValidator = z.string().min(1).max(45);\nexport const componentsValidator = z.array(z.instanceof(ActionRowBuilder)).min(1);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder<ModalActionRowComponentBuilder>[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","import type { APIModalInteractionResponseCallbackData } from 'discord-api-types/v10';\nimport { customIdValidator } from '../../components/Assertions';\nimport { titleValidator, validateRequiredParameters } from './Assertions';\nimport { UnsafeModalBuilder } from './UnsafeModal';\n\nexport class ModalBuilder extends UnsafeModalBuilder {\n\tpublic override setCustomId(customId: string): this {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setTitle(title: string) {\n\t\treturn super.setTitle(titleValidator.parse(title));\n\t}\n\n\tpublic override toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\t\treturn super.toJSON();\n\t}\n}\n","import { APISelectMenuOption, ComponentType, type APISelectMenuComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a non-validated select menu component\n */\nexport class UnsafeSelectMenuBuilder extends ComponentBuilder<\n\tPartial<Omit<APISelectMenuComponent, 'options'>> & { type: ComponentType.SelectMenu }\n> {\n\t/**\n\t * The options within this select menu\n\t */\n\tprotected readonly options: UnsafeSelectMenuOptionBuilder[];\n\n\tpublic constructor(data?: Partial<APISelectMenuComponent>) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ type: ComponentType.SelectMenu, ...initData });\n\t\tthis.options = options?.map((o) => new UnsafeSelectMenuOptionBuilder(o)) ?? [];\n\t}\n\n\t/**\n\t * Sets the placeholder for this select menu\n\t * @param placeholder The placeholder to use for this select menu\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu\n\t * @param minValues The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu\n\t * @param minValues The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = maxValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this select menu\n\t * @param customId The custom id to use for this select menu\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether or not this select menu is disabled\n\t * @param disabled Whether or not this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds options to this select menu\n\t * @param options The options to add to this select menu\n\t * @returns\n\t */\n\tpublic addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options on this select menu\n\t * @param options The options to set on this select menu\n\t */\n\tpublic setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((o) => o.toJSON()),\n\t\t} as APISelectMenuComponent;\n\t}\n}\n","import type { APISelectMenuComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tcustomIdValidator,\n\tdisabledValidator,\n\tminMaxValidator,\n\toptionsLengthValidator,\n\toptionValidator,\n\tplaceholderValidator,\n\tvalidateRequiredSelectMenuParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuBuilder } from './UnsafeSelectMenu';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated select menu component\n */\nexport class SelectMenuBuilder extends UnsafeSelectMenuBuilder {\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override setMinValues(minValues: number) {\n\t\treturn super.setMinValues(minMaxValidator.parse(minValues));\n\t}\n\n\tpublic override setMaxValues(maxValues: number) {\n\t\treturn super.setMaxValues(minMaxValidator.parse(maxValues));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(this.options.length + options.length);\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(options.length);\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON(): APISelectMenuComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\t\treturn super.toJSON();\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated option within a select menu component\n */\nexport class SelectMenuOptionBuilder extends UnsafeSelectMenuOptionBuilder {\n\tpublic override setDescription(description: string) {\n\t\treturn super.setDescription(labelValueValidator.parse(description));\n\t}\n\n\tpublic override setDefault(isDefault = true) {\n\t\treturn super.setDefault(defaultValidator.parse(isDefault));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\t\treturn super.toJSON();\n\t}\n}\n","import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^[\\P{Lu}\\p{N}_-]+$/u);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = z.string().min(1).max(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = z.unknown().array().max(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = z.number().lte(25);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record<PropertyKey, unknown>;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n","import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t *\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick<SlashCommandBuilder, 'toJSON' | 'addSubcommand' | 'addSubcommandGroup'> {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick<SlashCommandBuilder, 'toJSON'> {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON: () => APIApplicationCommandOption;\n}\n","import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired } from '../Assertions';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Marks the option as required\n\t *\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin';\n\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { ChannelType } from 'discord-api-types/v10';\nimport { z, ZodLiteral } from 'zod';\n\n// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime)\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildNews,\n\tChannelType.GuildStore,\n\tChannelType.GuildNewsThread,\n\tChannelType.GuildPublicThread,\n\tChannelType.GuildPrivateThread,\n\tChannelType.GuildStageVoice,\n] as const;\n\nexport type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number];\n\nconst channelTypesPredicate = z.array(\n\tz.union(\n\t\tallowedChannelTypes.map((type) => z.literal(type)) as [\n\t\t\tZodLiteral<ChannelType>,\n\t\t\tZodLiteral<ChannelType>,\n\t\t\t...ZodLiteral<ChannelType>[]\n\t\t],\n\t),\n);\n\nexport class ApplicationCommandOptionChannelTypesMixin {\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option\n\t *\n\t * @param channelTypes The channel types to add\n\t */\n\tpublic addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tchannelTypesPredicate.parse(channelTypes);\n\n\t\tthis.channel_types!.push(...channelTypes);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number().int();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","export abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\tpublic readonly max_value?: number;\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option\n\t * @param max The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option\n\t * @param min The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { validateChoicesLength } from '../Assertions';\n\nconst stringPredicate = z.string().min(1).max(100);\nconst numberPredicate = z.number().gt(-Infinity).lt(Infinity);\nconst choicesPredicate = z\n\t.object({ name: stringPredicate, value: z.union([stringPredicate, numberPredicate]) })\n\t.array();\nconst booleanPredicate = z.boolean();\n\nexport class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends string | number> {\n\tpublic readonly choices?: APIApplicationCommandOptionChoice<T>[];\n\tpublic readonly autocomplete?: boolean;\n\n\t// Since this is present and this is a mixin, this is needed\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices for this option\n\t *\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(choices.length, this.choices);\n\n\t\tfor (const { name, value } of choices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(...choices);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Marks the option as autocompletable\n\t * @param autocomplete If this option should be autocompletable\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","import { APIApplicationCommandRoleOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandStringOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\n@mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {}\n","import { APIApplicationCommandUserOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandAttachmentOption } from '../options/attachment';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput:\n\t\t\t| SlashCommandStringOption\n\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandStringOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandStringOption\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput:\n\t\t\t| SlashCommandIntegerOption\n\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandIntegerOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandIntegerOption\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput:\n\t\t\t| SlashCommandNumberOption\n\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandNumberOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandNumberOption\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod<T extends ApplicationCommandOptionBase>(\n\t\tinput:\n\t\t\t| T\n\t\t\t| Omit<T, 'setAutocomplete'>\n\t\t\t| Omit<T, 'addChoices'>\n\t\t\t| ((builder: T) => T | Omit<T, 'setAutocomplete'> | Omit<T, 'addChoices'>),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n","import {\n\tAPIApplicationCommandSubcommandGroupOption,\n\tAPIApplicationCommandSubcommandOption,\n\tApplicationCommandOptionType,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {}\n","import { z } from 'zod';\nimport { ApplicationCommandType } from 'discord-api-types/v10';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^( *[\\p{L}\\p{N}_-]+ *)+$/u);\n\nconst typePredicate = z.union([z.literal(ApplicationCommandType.User), z.literal(ApplicationCommandType.Message)]);\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n","import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions';\nimport type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\n\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this context menu command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The type of this context menu command\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type\n\t *\n\t * @param type The type\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttype: this.type,\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n}\n\nexport type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message;\n","export interface JSONEncodable<T> {\n\t/**\n\t * Transforms this object to its JSON format\n\t */\n\ttoJSON: () => T;\n}\n\n/**\n * Indicates if an object is encodable or not.\n * @param maybeEncodable The object to check against\n */\nexport function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown> {\n\treturn maybeEncodable !== null && typeof maybeEncodable === 'object' && 'toJSON' in maybeEncodable;\n}\n","export interface Equatable<T> {\n\t/**\n\t * Whether or not this is equal to another structure\n\t */\n\tequals: (other: T) => boolean;\n}\n\n/**\n * Indicates if an object is equatable or not.\n * @param maybeEquatable The object to check against\n */\nexport function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown> {\n\treturn maybeEquatable !== null && typeof maybeEquatable === 'object' && 'equals' in maybeEquatable;\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEO,IAAM,qBAAqB,EAAE,SAAS,IAAI,GAAG,IAAI;AAEjD,IAAM,sBAAsB,EAAE,SAAS,IAAI,GAAG,IAAI;AAElD,IAAM,uBAAuB,EAAE,UAAU;AAEzC,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA;AAGF,IAAM,4BAA4B,oBAAoB;AAEtD,IAAM,uBAAuB,EAAE,SAAS,IAAI;AAE5C,6BAA6B,cAAsB,QAAgC;AACzF,uBAAqB,MAAO,SAAQ,UAAU,KAAK;AAAA;AAD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;;;ACQA,yBAAyB,gBAAmE;AAClG,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AAAA;AADrE;;;ACAT,qBAAqB,gBAA+D;AAC1F,SAAO,mBAAmB,QAAQ,OAAO,mBAAmB,YAAY,YAAY;AAAA;AADrE;;;ACTT,qBAAqB,MAAgB;AAC3C,SACE,MAAK,OAAO,UAAU,KACtB,MAAK,aAAa,UAAU,KAC5B,MAAK,QAAQ,OAAO,CAAC,MAAM,SAAS,OAAO,KAAK,KAAK,SAAS,KAAK,MAAM,QAAQ,MAAM,KACvF,MAAK,QAAQ,KAAK,UAAU,KAC5B,MAAK,QAAQ,KAAK,UAAU;AAAA;AANf;","names":[]}
1
+ {"version":3,"sources":["../src/messages/embed/Assertions.ts","../src/messages/embed/UnsafeEmbed.ts","../src/messages/embed/Embed.ts","../src/messages/formatters.ts","../src/components/Assertions.ts","../src/components/selectMenu/UnsafeSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/UnsafeButton.ts","../src/components/button/Button.ts","../src/components/textInput/Assertions.ts","../src/components/textInput/UnsafeTextInput.ts","../src/components/textInput/TextInput.ts","../src/interactions/modals/UnsafeModal.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/components/selectMenu/UnsafeSelectMenu.ts","../src/components/selectMenu/SelectMenu.ts","../src/components/selectMenu/SelectMenuOption.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/jsonEncodable.ts","../src/util/equatable.ts","../src/util/componentUtil.ts"],"sourcesContent":["import type { APIEmbedField } from 'discord-api-types/v10';\nimport { z } from 'zod';\n\nexport const fieldNamePredicate = z.string().min(1).max(256);\n\nexport const fieldValuePredicate = z.string().min(1).max(1024);\n\nexport const fieldInlinePredicate = z.boolean().optional();\n\nexport const embedFieldPredicate = z.object({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array();\n\nexport const fieldLengthPredicate = z.number().lte(25);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable();\n\nexport const urlPredicate = z.string().url().nullish();\n\nexport const RGBPredicate = z.number().int().gte(0).lte(255);\nexport const colorPredicate = z\n\t.number()\n\t.int()\n\t.gte(0)\n\t.lte(0xffffff)\n\t.nullable()\n\t.or(z.tuple([RGBPredicate, RGBPredicate, RGBPredicate]));\n\nexport const descriptionPredicate = z.string().min(1).max(4096).nullable();\n\nexport const footerTextPredicate = z.string().min(1).max(2048).nullable();\n\nexport const timestampPredicate = z.union([z.number(), z.date()]).nullable();\n\nexport const titlePredicate = fieldNamePredicate.nullable();\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\n\nexport type RGBTuple = [red: number, green: number, blue: number];\n\nexport interface IconData {\n\t/**\n\t * The URL of the icon\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon\n\t */\n\tproxyIconURL?: string;\n}\n\nexport type EmbedAuthorData = Omit<APIEmbedAuthor, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedAuthorOptions = Omit<EmbedAuthorData, 'proxyIconURL'>;\n\nexport type EmbedFooterData = Omit<APIEmbedFooter, 'icon_url' | 'proxy_icon_url'> & IconData;\n\nexport type EmbedFooterOptions = Omit<EmbedFooterData, 'proxyIconURL'>;\n\nexport interface EmbedImageData extends Omit<APIEmbedImage, 'proxy_url'> {\n\t/**\n\t * The proxy URL for the image\n\t */\n\tproxyURL?: string;\n}\n\n/**\n * Represents a non-validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class UnsafeEmbedBuilder {\n\tpublic readonly data: APIEmbed;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.data = { ...data };\n\t\tif (data.timestamp) this.data.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25)\n\t *\n\t * @param fields The fields to add\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.push(...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25)\n\t *\n\t * @param index The index to start at\n\t * @param deleteCount The number of fields to remove\n\t * @param fields The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\tif (this.data.fields) this.data.fields.splice(index, deleteCount, ...fields);\n\t\telse this.data.fields = fields;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the embed's fields (max 25).\n\t * @param fields The fields to set\n\t */\n\tpublic setFields(...fields: APIEmbedField[]) {\n\t\tthis.spliceFields(0, this.data.fields?.length ?? 0, ...fields);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed\n\t *\n\t * @param options The options for the author\n\t */\n\tpublic setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed\n\t *\n\t * @param color The color of the embed\n\t */\n\tpublic setColor(color: number | RGBTuple | null): this {\n\t\tif (Array.isArray(color)) {\n\t\t\tconst [red, green, blue] = color;\n\t\t\tthis.data.color = (red << 16) + (green << 8) + blue;\n\t\t\treturn this;\n\t\t}\n\t\tthis.data.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\tthis.data.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed\n\t *\n\t * @param options The options for the footer\n\t */\n\tpublic setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.data.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tthis.data.footer = { text: options.text, icon_url: options.iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed\n\t *\n\t * @param url The URL of the image\n\t */\n\tpublic setImage(url: string | null): this {\n\t\tthis.data.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed\n\t *\n\t * @param url The URL of the thumbnail\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\tthis.data.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed\n\t *\n\t * @param timestamp The timestamp or date\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\tthis.data.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed\n\t *\n\t * @param title The title\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\tthis.data.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed\n\t *\n\t * @param url The URL\n\t */\n\tpublic setURL(url: string | null): this {\n\t\tthis.data.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this.data };\n\t}\n}\n","import type { APIEmbedField } from 'discord-api-types/v10';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\nimport { EmbedAuthorOptions, EmbedFooterOptions, RGBTuple, UnsafeEmbedBuilder } from './UnsafeEmbed';\n\n/**\n * Represents a validated embed in a message (image/video preview, rich embed, etc.)\n */\nexport class EmbedBuilder extends UnsafeEmbedBuilder {\n\tpublic override addFields(...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.addFields(...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(fields.length - deleteCount, this.data.fields);\n\n\t\t// Data assertions\n\t\treturn super.spliceFields(index, deleteCount, ...embedFieldsArrayPredicate.parse(fields));\n\t}\n\n\tpublic override setAuthor(options: EmbedAuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setAuthor(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tauthorNamePredicate.parse(options.name);\n\t\turlPredicate.parse(options.iconURL);\n\t\turlPredicate.parse(options.url);\n\n\t\treturn super.setAuthor(options);\n\t}\n\n\tpublic override setColor(color: number | RGBTuple | null): this {\n\t\t// Data assertions\n\t\treturn super.setColor(colorPredicate.parse(color));\n\t}\n\n\tpublic override setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setDescription(descriptionPredicate.parse(description));\n\t}\n\n\tpublic override setFooter(options: EmbedFooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\treturn super.setFooter(null);\n\t\t}\n\n\t\t// Data assertions\n\t\tfooterTextPredicate.parse(options.text);\n\t\turlPredicate.parse(options.iconURL);\n\n\t\treturn super.setFooter(options);\n\t}\n\n\tpublic override setImage(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setImage(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setThumbnail(urlPredicate.parse(url)!);\n\t}\n\n\tpublic override setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\treturn super.setTimestamp(timestampPredicate.parse(timestamp));\n\t}\n\n\tpublic override setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setTitle(titlePredicate.parse(title));\n\t}\n\n\tpublic override setURL(url: string | null): this {\n\t\t// Data assertions\n\t\treturn super.setURL(urlPredicate.parse(url)!);\n\t}\n}\n","import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @param content The content to wrap\n */\nexport function codeBlock<C extends string>(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @param language The language for the codeblock\n * @param content The content to wrap\n */\nexport function codeBlock<L extends string, C extends string>(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code\n *\n * @param content The content to wrap\n */\nexport function inlineCode<C extends string>(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text\n *\n * @param content The content to wrap\n */\nexport function italic<C extends string>(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text\n *\n * @param content The content to wrap\n */\nexport function bold<C extends string>(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text\n *\n * @param content The content to wrap\n */\nexport function underscore<C extends string>(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text\n *\n * @param content The content to wrap\n */\nexport function strikethrough<C extends string>(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function quote<C extends string>(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function blockQuote<C extends string>(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed<C extends string>(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string>(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink<C extends string, U extends string>(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, T extends string>(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink<C extends string, U extends string, T extends string>(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text)\n *\n * @param content The content to wrap\n */\nexport function spoiler<C extends string>(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention\n *\n * @param userId The user ID to format\n */\nexport function userMention<C extends Snowflake>(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention\n *\n * @param memberId The user ID to format\n */\nexport function memberNicknameMention<C extends Snowflake>(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention\n *\n * @param channelId The channel ID to format\n */\nexport function channelMention<C extends Snowflake>(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention\n *\n * @param roleId The role ID to format\n */\nexport function roleMention<C extends Snowflake>(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated?: true): `<a:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji<C extends Snowflake>(emojiId: C, animated = false): `<a:_:${C}>` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string\n *\n * @param date The date to format, defaults to the current time\n */\nexport function time(date?: Date): `<t:${bigint}>`;\n\n/**\n * Formats a date given a format style\n *\n * @param date The date to format\n * @param style The style to use\n */\nexport function time<S extends TimestampStylesString>(date: Date, style: S): `<t:${bigint}:${S}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n */\nexport function time<C extends number>(seconds: C): `<t:${C}>`;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n * @param style The style to use\n */\nexport function time<C extends number, S extends TimestampStylesString>(seconds: C, style: S): `<t:${C}:${S}>`;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `<t:${timeOrSeconds}:${style}>` : `<t:${timeOrSeconds}>`;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * ¯\\\\_(ツ)\\\\_/¯\n\t */\n\tShrug = '¯\\\\_(ツ)\\\\_/¯',\n\n\t/**\n\t * (╯°□°)╯︵ ┻━┻\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\n\t * ┬─┬ ノ( ゜-゜ノ)\n\t */\n\tUnflip = '┬─┬ ノ( ゜-゜ノ)',\n}\n","import { APIMessageComponentEmoji, ButtonStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { SelectMenuOptionBuilder } from './selectMenu/SelectMenuOption';\nimport { UnsafeSelectMenuOptionBuilder } from './selectMenu/UnsafeSelectMenuOption';\n\nexport const customIdValidator = z.string().min(1).max(100);\n\nexport const emojiValidator = z\n\t.object({\n\t\tid: z.string(),\n\t\tname: z.string(),\n\t\tanimated: z.boolean(),\n\t})\n\t.partial()\n\t.strict();\n\nexport const disabledValidator = z.boolean();\n\nexport const buttonLabelValidator = z.string().nonempty().max(80);\n\nexport const buttonStyleValidator = z.number().int().min(ButtonStyle.Primary).max(ButtonStyle.Link);\n\nexport const placeholderValidator = z.string().max(150);\nexport const minMaxValidator = z.number().int().min(0).max(25);\n\nexport const labelValueDescriptionValidator = z.string().min(1).max(100);\nexport const optionValidator = z.union([\n\tz.object({\n\t\tlabel: labelValueDescriptionValidator,\n\t\tvalue: labelValueDescriptionValidator,\n\t\tdescription: labelValueDescriptionValidator.optional(),\n\t\temoji: emojiValidator.optional(),\n\t\tdefault: z.boolean().optional(),\n\t}),\n\tz.instanceof(UnsafeSelectMenuOptionBuilder),\n]);\nexport const optionsValidator = optionValidator.array().nonempty();\nexport const optionsLengthValidator = z.number().int().min(0).max(25);\n\nexport function validateRequiredSelectMenuParameters(options: SelectMenuOptionBuilder[], customId?: string) {\n\tcustomIdValidator.parse(customId);\n\toptionsValidator.parse(options);\n}\n\nexport const labelValueValidator = z.string().min(1).max(100);\nexport const defaultValidator = z.boolean();\n\nexport function validateRequiredSelectMenuOptionParameters(label?: string, value?: string) {\n\tlabelValueValidator.parse(label);\n\tlabelValueValidator.parse(value);\n}\n\nexport const urlValidator = z.string().url();\n\nexport function validateRequiredButtonParameters(\n\tstyle?: ButtonStyle,\n\tlabel?: string,\n\temoji?: APIMessageComponentEmoji,\n\tcustomId?: string,\n\turl?: string,\n) {\n\tif (url && customId) {\n\t\tthrow new RangeError('URL and custom id are mutually exclusive');\n\t}\n\n\tif (!label && !emoji) {\n\t\tthrow new RangeError('Buttons must have a label and/or an emoji');\n\t}\n\n\tif (style === ButtonStyle.Link) {\n\t\tif (!url) {\n\t\t\tthrow new RangeError('Link buttons must have a url');\n\t\t}\n\t} else if (url) {\n\t\tthrow new RangeError('Non-link buttons cannot have a url');\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\n\n/**\n * Represents a non-validated option within a select menu component\n */\nexport class UnsafeSelectMenuOptionBuilder {\n\tpublic constructor(public data: Partial<APISelectMenuOption> = {}) {}\n\n\t/**\n\t * Sets the label of this option\n\t * @param label The label to show on this option\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this option\n\t * @param value The value of this option\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this option.\n\t * @param description The description of this option\n\t */\n\tpublic setDescription(description: string) {\n\t\tthis.data.description = description;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this option is selected by default\n\t * @param isDefault Whether this option is selected by default\n\t */\n\tpublic setDefault(isDefault = true) {\n\t\tthis.data.default = isDefault;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this option\n\t * @param emoji The emoji to display on this option\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuOption {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APISelectMenuOption;\n\t}\n}\n","import {\n\ttype APIActionRowComponent,\n\tComponentType,\n\tAPIMessageActionRowComponent,\n\tAPIModalActionRowComponent,\n} from 'discord-api-types/v10';\nimport type { ButtonBuilder, SelectMenuBuilder, TextInputBuilder } from '..';\nimport { ComponentBuilder } from './Component';\nimport { createComponentBuilder } from './Components';\n\nexport type MessageComponentBuilder =\n\t| MessageActionRowComponentBuilder\n\t| ActionRowBuilder<MessageActionRowComponentBuilder>;\nexport type ModalComponentBuilder = ModalActionRowComponentBuilder | ActionRowBuilder<ModalActionRowComponentBuilder>;\n\nexport type MessageActionRowComponentBuilder = ButtonBuilder | SelectMenuBuilder;\nexport type ModalActionRowComponentBuilder = TextInputBuilder;\n\n/**\n * Represents an action row component\n */\nexport class ActionRowBuilder<\n\tT extends MessageActionRowComponentBuilder | ModalActionRowComponentBuilder =\n\t\t| MessageActionRowComponentBuilder\n\t\t| ModalActionRowComponentBuilder,\n> extends ComponentBuilder<\n\tOmit<\n\t\tPartial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> & {\n\t\t\ttype: ComponentType.ActionRow;\n\t\t},\n\t\t'components'\n\t>\n> {\n\t/**\n\t * The components within this action row\n\t */\n\tpublic readonly components: T[];\n\n\tpublic constructor({\n\t\tcomponents,\n\t\t...data\n\t}: Partial<APIActionRowComponent<APIMessageActionRowComponent | APIModalActionRowComponent>> = {}) {\n\t\tsuper({ type: ComponentType.ActionRow, ...data });\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ?? []) as T[];\n\t}\n\n\t/**\n\t * Adds components to this action row.\n\t * @param components The components to add to this action row.\n\t * @returns\n\t */\n\tpublic addComponents(...components: T[]) {\n\t\tthis.components.push(...components);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this action row\n\t * @param components The components to set this row to\n\t */\n\tpublic setComponents(...components: T[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIActionRowComponent<ReturnType<T['toJSON']>> {\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()) as ReturnType<T['toJSON']>[],\n\t\t};\n\t}\n}\n","import type { JSONEncodable } from '../util/jsonEncodable';\nimport type {\n\tAPIActionRowComponent,\n\tAPIActionRowComponentTypes,\n\tAPIBaseComponent,\n\tAPIMessageActionRowComponent,\n\tAPIMessageComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalComponent,\n\tComponentType,\n} from 'discord-api-types/v10';\n\n/**\n * Represents a discord component\n */\nexport abstract class ComponentBuilder<\n\tDataType extends Partial<APIBaseComponent<ComponentType>> & {\n\t\ttype: ComponentType;\n\t} = APIBaseComponent<ComponentType>,\n> implements\n\t\tJSONEncodable<\n\t\t\t| APIModalComponent\n\t\t\t| APIMessageComponent\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>\n\t\t>\n{\n\t/**\n\t * The API data associated with this component\n\t */\n\tpublic readonly data: DataType;\n\n\tpublic abstract toJSON():\n\t\t| APIActionRowComponentTypes\n\t\t| APIActionRowComponent<APIModalActionRowComponent | APIMessageActionRowComponent>;\n\n\tpublic constructor(data: DataType) {\n\t\tthis.data = data;\n\t}\n}\n","import { APIMessageComponent, APIModalComponent, ComponentType } from 'discord-api-types/v10';\nimport { ActionRowBuilder, ButtonBuilder, ComponentBuilder, SelectMenuBuilder, TextInputBuilder } from '../index';\nimport type { MessageComponentBuilder, ModalComponentBuilder } from './ActionRow';\n\nexport interface MappedComponentTypes {\n\t[ComponentType.ActionRow]: ActionRowBuilder;\n\t[ComponentType.Button]: ButtonBuilder;\n\t[ComponentType.SelectMenu]: SelectMenuBuilder;\n\t[ComponentType.TextInput]: TextInputBuilder;\n}\n\n/**\n * Factory for creating components from API data\n * @param data The api data to transform to a component class\n */\nexport function createComponentBuilder<T extends keyof MappedComponentTypes>(\n\tdata: (APIMessageComponent | APIModalComponent) & { type: T },\n): MappedComponentTypes[T];\nexport function createComponentBuilder<C extends MessageComponentBuilder | ModalComponentBuilder>(data: C): C;\nexport function createComponentBuilder(\n\tdata: APIMessageComponent | APIModalComponent | MessageComponentBuilder,\n): ComponentBuilder {\n\tif (data instanceof ComponentBuilder) {\n\t\treturn data;\n\t}\n\n\tswitch (data.type) {\n\t\tcase ComponentType.ActionRow:\n\t\t\treturn new ActionRowBuilder(data);\n\t\tcase ComponentType.Button:\n\t\t\treturn new ButtonBuilder(data);\n\t\tcase ComponentType.SelectMenu:\n\t\t\treturn new SelectMenuBuilder(data);\n\t\tcase ComponentType.TextInput:\n\t\t\treturn new TextInputBuilder(data);\n\t\tdefault:\n\t\t\t// @ts-expect-error\n\t\t\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\t\t\tthrow new Error(`Cannot properly serialize component type: ${data.type}`);\n\t}\n}\n","import {\n\tComponentType,\n\tButtonStyle,\n\ttype APIMessageComponentEmoji,\n\ttype APIButtonComponent,\n\ttype APIButtonComponentWithURL,\n\ttype APIButtonComponentWithCustomId,\n} from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\n\n/**\n * Represents a non-validated button component\n */\nexport class UnsafeButtonBuilder extends ComponentBuilder<\n\tPartial<APIButtonComponent> & { type: ComponentType.Button }\n> {\n\tpublic constructor(data?: Partial<APIButtonComponent>) {\n\t\tsuper({ type: ComponentType.Button, ...data });\n\t}\n\n\t/**\n\t * Sets the style of this button\n\t * @param style The style of the button\n\t */\n\tpublic setStyle(style: ButtonStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL for this button\n\t * @param url The URL to open when this button is clicked\n\t */\n\tpublic setURL(url: string) {\n\t\t(this.data as APIButtonComponentWithURL).url = url;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this button\n\t * @param customId The custom id to use for this button\n\t */\n\tpublic setCustomId(customId: string) {\n\t\t(this.data as APIButtonComponentWithCustomId).custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the emoji to display on this button\n\t * @param emoji The emoji to display on this button\n\t */\n\tpublic setEmoji(emoji: APIMessageComponentEmoji) {\n\t\tthis.data.emoji = emoji;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this button is disable or not\n\t * @param disabled Whether or not to disable this button or not\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this button\n\t * @param label The label to display on this button\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIButtonComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APIButtonComponent;\n\t}\n}\n","import type {\n\tButtonStyle,\n\tAPIMessageComponentEmoji,\n\tAPIButtonComponent,\n\tAPIButtonComponentWithCustomId,\n\tAPIButtonComponentWithURL,\n} from 'discord-api-types/v10';\nimport {\n\tbuttonLabelValidator,\n\tbuttonStyleValidator,\n\tcustomIdValidator,\n\tdisabledValidator,\n\temojiValidator,\n\turlValidator,\n\tvalidateRequiredButtonParameters,\n} from '../Assertions';\nimport { UnsafeButtonBuilder } from './UnsafeButton';\n\n/**\n * Represents a validated button component\n */\nexport class ButtonBuilder extends UnsafeButtonBuilder {\n\tpublic override setStyle(style: ButtonStyle) {\n\t\treturn super.setStyle(buttonStyleValidator.parse(style));\n\t}\n\n\tpublic override setURL(url: string) {\n\t\treturn super.setURL(urlValidator.parse(url));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override setLabel(label: string) {\n\t\treturn super.setLabel(buttonLabelValidator.parse(label));\n\t}\n\n\tpublic override toJSON(): APIButtonComponent {\n\t\tvalidateRequiredButtonParameters(\n\t\t\tthis.data.style,\n\t\t\tthis.data.label,\n\t\t\tthis.data.emoji,\n\t\t\t(this.data as APIButtonComponentWithCustomId).custom_id,\n\t\t\t(this.data as APIButtonComponentWithURL).url,\n\t\t);\n\t\treturn super.toJSON();\n\t}\n}\n","import { TextInputStyle } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { customIdValidator } from '../Assertions';\n\nexport const textInputStyleValidator = z.nativeEnum(TextInputStyle);\nexport const minLengthValidator = z.number().int().min(0).max(4000);\nexport const maxLengthValidator = z.number().int().min(1).max(4000);\nexport const requiredValidator = z.boolean();\nexport const valueValidator = z.string().max(4000);\nexport const placeholderValidator = z.string().max(100);\nexport const labelValidator = z.string().min(1).max(45);\n\nexport function validateRequiredParameters(customId?: string, style?: TextInputStyle, label?: string) {\n\tcustomIdValidator.parse(customId);\n\ttextInputStyleValidator.parse(style);\n\tlabelValidator.parse(label);\n}\n","import { ComponentType, type TextInputStyle, type APITextInputComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../../index';\nimport isEqual from 'fast-deep-equal';\n\nexport class UnsafeTextInputBuilder extends ComponentBuilder<\n\tPartial<APITextInputComponent> & { type: ComponentType.TextInput }\n> {\n\tpublic constructor(data?: APITextInputComponent & { type?: ComponentType.TextInput }) {\n\t\tsuper({ type: ComponentType.TextInput, ...data });\n\t}\n\n\t/**\n\t * Sets the custom id for this text input\n\t * @param customId The custom id of this text inputå\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the label for this text input\n\t * @param label The label for this text input\n\t */\n\tpublic setLabel(label: string) {\n\t\tthis.data.label = label;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the style for this text input\n\t * @param style The style for this text input\n\t */\n\tpublic setStyle(style: TextInputStyle) {\n\t\tthis.data.style = style;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum length of text for this text input\n\t * @param minLength The minimum length of text for this text input\n\t */\n\tpublic setMinLength(minLength: number) {\n\t\tthis.data.min_length = minLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum length of text for this text input\n\t * @param maxLength The maximum length of text for this text input\n\t */\n\tpublic setMaxLength(maxLength: number) {\n\t\tthis.data.max_length = maxLength;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the placeholder of this text input\n\t * @param placeholder The placeholder of this text input\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the value of this text input\n\t * @param value The value for this text input\n\t */\n\tpublic setValue(value: string) {\n\t\tthis.data.value = value;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether this text input is required or not\n\t * @param required Whether this text input is required or not\n\t */\n\tpublic setRequired(required = true) {\n\t\tthis.data.required = required;\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APITextInputComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t} as APITextInputComponent;\n\t}\n\n\tpublic equals(other: UnsafeTextInputBuilder | APITextInputComponent): boolean {\n\t\tif (other instanceof UnsafeTextInputBuilder) {\n\t\t\treturn isEqual(other.data, this.data);\n\t\t}\n\n\t\treturn isEqual(other, this.data);\n\t}\n}\n","import type { APITextInputComponent } from 'discord-api-types/v10';\nimport {\n\tmaxLengthValidator,\n\tminLengthValidator,\n\tplaceholderValidator,\n\trequiredValidator,\n\tvalueValidator,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { UnsafeTextInputBuilder } from './UnsafeTextInput';\n\nexport class TextInputBuilder extends UnsafeTextInputBuilder {\n\tpublic override setMinLength(minLength: number) {\n\t\treturn super.setMinLength(minLengthValidator.parse(minLength));\n\t}\n\n\tpublic override setMaxLength(maxLength: number) {\n\t\treturn super.setMaxLength(maxLengthValidator.parse(maxLength));\n\t}\n\n\tpublic override setRequired(required = true) {\n\t\treturn super.setRequired(requiredValidator.parse(required));\n\t}\n\n\tpublic override setValue(value: string) {\n\t\treturn super.setValue(valueValidator.parse(value));\n\t}\n\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override toJSON(): APITextInputComponent {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);\n\t\treturn super.toJSON();\n\t}\n}\n","import type {\n\tAPIActionRowComponent,\n\tAPIModalActionRowComponent,\n\tAPIModalInteractionResponseCallbackData,\n} from 'discord-api-types/v10';\nimport { ActionRowBuilder, createComponentBuilder, JSONEncodable, ModalActionRowComponentBuilder } from '../../index';\n\nexport class UnsafeModalBuilder implements JSONEncodable<APIModalInteractionResponseCallbackData> {\n\tpublic readonly data: Partial<Omit<APIModalInteractionResponseCallbackData, 'components'>>;\n\tpublic readonly components: ActionRowBuilder<ModalActionRowComponentBuilder>[] = [];\n\n\tpublic constructor({ components, ...data }: Partial<APIModalInteractionResponseCallbackData> = {}) {\n\t\tthis.data = { ...data };\n\t\tthis.components = (components?.map((c) => createComponentBuilder(c)) ??\n\t\t\t[]) as ActionRowBuilder<ModalActionRowComponentBuilder>[];\n\t}\n\n\t/**\n\t * Sets the title of the modal\n\t * @param title The title of the modal\n\t */\n\tpublic setTitle(title: string) {\n\t\tthis.data.title = title;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom id of the modal\n\t * @param customId The custom id of this modal\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds components to this modal\n\t * @param components The components to add to this modal\n\t */\n\tpublic addComponents(\n\t\t...components: (\n\t\t\t| ActionRowBuilder<ModalActionRowComponentBuilder>\n\t\t\t| APIActionRowComponent<APIModalActionRowComponent>\n\t\t)[]\n\t) {\n\t\tthis.components.push(\n\t\t\t...components.map((component) =>\n\t\t\t\tcomponent instanceof ActionRowBuilder\n\t\t\t\t\t? component\n\t\t\t\t\t: new ActionRowBuilder<ModalActionRowComponentBuilder>(component),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the components in this modal\n\t * @param components The components to set this modal to\n\t */\n\tpublic setComponents(...components: ActionRowBuilder<ModalActionRowComponentBuilder>[]) {\n\t\tthis.components.splice(0, this.components.length, ...components);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIModalInteractionResponseCallbackData {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\tcomponents: this.components.map((component) => component.toJSON()),\n\t\t} as APIModalInteractionResponseCallbackData;\n\t}\n}\n","import { z } from 'zod';\nimport { ActionRowBuilder, type ModalActionRowComponentBuilder } from '../..';\nimport { customIdValidator } from '../../components/Assertions';\n\nexport const titleValidator = z.string().min(1).max(45);\nexport const componentsValidator = z.array(z.instanceof(ActionRowBuilder)).min(1);\n\nexport function validateRequiredParameters(\n\tcustomId?: string,\n\ttitle?: string,\n\tcomponents?: ActionRowBuilder<ModalActionRowComponentBuilder>[],\n) {\n\tcustomIdValidator.parse(customId);\n\ttitleValidator.parse(title);\n\tcomponentsValidator.parse(components);\n}\n","import type { APIModalInteractionResponseCallbackData } from 'discord-api-types/v10';\nimport { customIdValidator } from '../../components/Assertions';\nimport { titleValidator, validateRequiredParameters } from './Assertions';\nimport { UnsafeModalBuilder } from './UnsafeModal';\n\nexport class ModalBuilder extends UnsafeModalBuilder {\n\tpublic override setCustomId(customId: string): this {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setTitle(title: string) {\n\t\treturn super.setTitle(titleValidator.parse(title));\n\t}\n\n\tpublic override toJSON(): APIModalInteractionResponseCallbackData {\n\t\tvalidateRequiredParameters(this.data.custom_id, this.data.title, this.components);\n\t\treturn super.toJSON();\n\t}\n}\n","import { APISelectMenuOption, ComponentType, type APISelectMenuComponent } from 'discord-api-types/v10';\nimport { ComponentBuilder } from '../Component';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a non-validated select menu component\n */\nexport class UnsafeSelectMenuBuilder extends ComponentBuilder<\n\tPartial<Omit<APISelectMenuComponent, 'options'>> & { type: ComponentType.SelectMenu }\n> {\n\t/**\n\t * The options within this select menu\n\t */\n\tpublic readonly options: UnsafeSelectMenuOptionBuilder[];\n\n\tpublic constructor(data?: Partial<APISelectMenuComponent>) {\n\t\tconst { options, ...initData } = data ?? {};\n\t\tsuper({ type: ComponentType.SelectMenu, ...initData });\n\t\tthis.options = options?.map((o) => new UnsafeSelectMenuOptionBuilder(o)) ?? [];\n\t}\n\n\t/**\n\t * Sets the placeholder for this select menu\n\t * @param placeholder The placeholder to use for this select menu\n\t */\n\tpublic setPlaceholder(placeholder: string) {\n\t\tthis.data.placeholder = placeholder;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the minimum values that must be selected in the select menu\n\t * @param minValues The minimum values that must be selected\n\t */\n\tpublic setMinValues(minValues: number) {\n\t\tthis.data.min_values = minValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the maximum values that must be selected in the select menu\n\t * @param minValues The maximum values that must be selected\n\t */\n\tpublic setMaxValues(maxValues: number) {\n\t\tthis.data.max_values = maxValues;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the custom Id for this select menu\n\t * @param customId The custom id to use for this select menu\n\t */\n\tpublic setCustomId(customId: string) {\n\t\tthis.data.custom_id = customId;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether or not this select menu is disabled\n\t * @param disabled Whether or not this select menu is disabled\n\t */\n\tpublic setDisabled(disabled = true) {\n\t\tthis.data.disabled = disabled;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds options to this select menu\n\t * @param options The options to add to this select menu\n\t * @returns\n\t */\n\tpublic addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the options on this select menu\n\t * @param options The options to set on this select menu\n\t */\n\tpublic setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder ? option : new UnsafeSelectMenuOptionBuilder(option),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APISelectMenuComponent {\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\treturn {\n\t\t\t...this.data,\n\t\t\toptions: this.options.map((o) => o.toJSON()),\n\t\t} as APISelectMenuComponent;\n\t}\n}\n","import type { APISelectMenuComponent, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tcustomIdValidator,\n\tdisabledValidator,\n\tminMaxValidator,\n\toptionsLengthValidator,\n\toptionValidator,\n\tplaceholderValidator,\n\tvalidateRequiredSelectMenuParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuBuilder } from './UnsafeSelectMenu';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated select menu component\n */\nexport class SelectMenuBuilder extends UnsafeSelectMenuBuilder {\n\tpublic override setPlaceholder(placeholder: string) {\n\t\treturn super.setPlaceholder(placeholderValidator.parse(placeholder));\n\t}\n\n\tpublic override setMinValues(minValues: number) {\n\t\treturn super.setMinValues(minMaxValidator.parse(minValues));\n\t}\n\n\tpublic override setMaxValues(maxValues: number) {\n\t\treturn super.setMaxValues(minMaxValidator.parse(maxValues));\n\t}\n\n\tpublic override setCustomId(customId: string) {\n\t\treturn super.setCustomId(customIdValidator.parse(customId));\n\t}\n\n\tpublic override setDisabled(disabled = true) {\n\t\treturn super.setDisabled(disabledValidator.parse(disabled));\n\t}\n\n\tpublic override addOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(this.options.length + options.length);\n\t\tthis.options.push(\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override setOptions(...options: (UnsafeSelectMenuOptionBuilder | APISelectMenuOption)[]) {\n\t\toptionsLengthValidator.parse(options.length);\n\t\tthis.options.splice(\n\t\t\t0,\n\t\t\tthis.options.length,\n\t\t\t...options.map((option) =>\n\t\t\t\toption instanceof UnsafeSelectMenuOptionBuilder\n\t\t\t\t\t? option\n\t\t\t\t\t: new UnsafeSelectMenuOptionBuilder(optionValidator.parse(option) as APISelectMenuOption),\n\t\t\t),\n\t\t);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON(): APISelectMenuComponent {\n\t\tvalidateRequiredSelectMenuParameters(this.options, this.data.custom_id);\n\t\treturn super.toJSON();\n\t}\n}\n","import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';\nimport {\n\tdefaultValidator,\n\temojiValidator,\n\tlabelValueValidator,\n\tvalidateRequiredSelectMenuOptionParameters,\n} from '../Assertions';\nimport { UnsafeSelectMenuOptionBuilder } from './UnsafeSelectMenuOption';\n\n/**\n * Represents a validated option within a select menu component\n */\nexport class SelectMenuOptionBuilder extends UnsafeSelectMenuOptionBuilder {\n\tpublic override setDescription(description: string) {\n\t\treturn super.setDescription(labelValueValidator.parse(description));\n\t}\n\n\tpublic override setDefault(isDefault = true) {\n\t\treturn super.setDefault(defaultValidator.parse(isDefault));\n\t}\n\n\tpublic override setEmoji(emoji: APIMessageComponentEmoji) {\n\t\treturn super.setEmoji(emojiValidator.parse(emoji));\n\t}\n\n\tpublic override toJSON(): APISelectMenuOption {\n\t\tvalidateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);\n\t\treturn super.toJSON();\n\t}\n}\n","import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^[\\P{Lu}\\p{N}_-]+$/u);\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nconst descriptionPredicate = z.string().min(1).max(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tdescriptionPredicate.parse(description);\n}\n\nconst maxArrayLengthPredicate = z.unknown().array().max(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tmaxArrayLengthPredicate.parse(options);\n}\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateRequired(required: unknown): asserts required is boolean {\n\tbooleanPredicate.parse(required);\n}\n\nconst choicesLengthPredicate = z.number().lte(25);\n\nexport function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void {\n\tchoicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends ApplicationCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record<PropertyKey, unknown>;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n","import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t *\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick<SlashCommandBuilder, 'toJSON' | 'addSubcommand' | 'addSubcommandGroup'> {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick<SlashCommandBuilder, 'toJSON'> {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON: () => APIApplicationCommandOption;\n}\n","import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandBooleanOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic toJSON(): APIApplicationCommandBooleanOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string): this {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n","import type { APIApplicationCommandBasicOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { validateRequiredParameters, validateRequired } from '../Assertions';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {\n\tpublic abstract readonly type: ApplicationCommandOptionType;\n\n\tpublic readonly required: boolean = false;\n\n\t/**\n\t * Marks the option as required\n\t *\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(required);\n\n\t\tReflect.set(this, 'required', required);\n\n\t\treturn this;\n\t}\n\n\tpublic abstract toJSON(): APIApplicationCommandBasicOption;\n\n\tprotected runRequiredValidations() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tvalidateRequired(this.required);\n\t}\n}\n","import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin';\n\n@mix(ApplicationCommandOptionChannelTypesMixin)\nexport class SlashCommandChannelOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic toJSON(): APIApplicationCommandChannelOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {}\n","import { ChannelType } from 'discord-api-types/v10';\nimport { z, ZodLiteral } from 'zod';\n\n// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime)\nconst allowedChannelTypes = [\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildCategory,\n\tChannelType.GuildNews,\n\tChannelType.GuildStore,\n\tChannelType.GuildNewsThread,\n\tChannelType.GuildPublicThread,\n\tChannelType.GuildPrivateThread,\n\tChannelType.GuildStageVoice,\n] as const;\n\nexport type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number];\n\nconst channelTypesPredicate = z.array(\n\tz.union(\n\t\tallowedChannelTypes.map((type) => z.literal(type)) as [\n\t\t\tZodLiteral<ChannelType>,\n\t\t\tZodLiteral<ChannelType>,\n\t\t\t...ZodLiteral<ChannelType>[]\n\t\t],\n\t),\n);\n\nexport class ApplicationCommandOptionChannelTypesMixin {\n\tpublic readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];\n\n\t/**\n\t * Adds channel types to this option\n\t *\n\t * @param channelTypes The channel types to add\n\t */\n\tpublic addChannelTypes(...channelTypes: ApplicationCommandOptionAllowedChannelTypes[]) {\n\t\tif (this.channel_types === undefined) {\n\t\t\tReflect.set(this, 'channel_types', []);\n\t\t}\n\n\t\tchannelTypesPredicate.parse(channelTypes);\n\n\t\tthis.channel_types!.push(...channelTypes);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number().int();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandIntegerOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandIntegerOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandIntegerOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","export abstract class ApplicationCommandNumericOptionMinMaxValueMixin {\n\tpublic readonly max_value?: number;\n\tpublic readonly min_value?: number;\n\n\t/**\n\t * Sets the maximum number value of this option\n\t * @param max The maximum value this option can be\n\t */\n\tpublic abstract setMaxValue(max: number): this;\n\n\t/**\n\t * Sets the minimum number value of this option\n\t * @param min The minimum value this option can be\n\t */\n\tpublic abstract setMinValue(min: number): this;\n}\n","import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { z } from 'zod';\nimport { validateChoicesLength } from '../Assertions';\n\nconst stringPredicate = z.string().min(1).max(100);\nconst numberPredicate = z.number().gt(-Infinity).lt(Infinity);\nconst choicesPredicate = z\n\t.object({ name: stringPredicate, value: z.union([stringPredicate, numberPredicate]) })\n\t.array();\nconst booleanPredicate = z.boolean();\n\nexport class ApplicationCommandOptionWithChoicesAndAutocompleteMixin<T extends string | number> {\n\tpublic readonly choices?: APIApplicationCommandOptionChoice<T>[];\n\tpublic readonly autocomplete?: boolean;\n\n\t// Since this is present and this is a mixin, this is needed\n\tpublic readonly type!: ApplicationCommandOptionType;\n\n\t/**\n\t * Adds multiple choices for this option\n\t *\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(...choices: APIApplicationCommandOptionChoice<T>[]): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tif (this.choices === undefined) {\n\t\t\tReflect.set(this, 'choices', []);\n\t\t}\n\n\t\tvalidateChoicesLength(choices.length, this.choices);\n\n\t\tfor (const { name, value } of choices) {\n\t\t\t// Validate the value\n\t\t\tif (this.type === ApplicationCommandOptionType.String) {\n\t\t\t\tstringPredicate.parse(value);\n\t\t\t} else {\n\t\t\t\tnumberPredicate.parse(value);\n\t\t\t}\n\n\t\t\tthis.choices!.push({ name, value });\n\t\t}\n\n\t\treturn this;\n\t}\n\n\tpublic setChoices<Input extends APIApplicationCommandOptionChoice<T>[]>(...choices: Input): this {\n\t\tif (choices.length > 0 && this.autocomplete) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tchoicesPredicate.parse(choices);\n\n\t\tReflect.set(this, 'choices', []);\n\t\tthis.addChoices(...choices);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Marks the option as autocompletable\n\t * @param autocomplete If this option should be autocompletable\n\t */\n\tpublic setAutocomplete(autocomplete: boolean): this {\n\t\t// Assert that you actually passed a boolean\n\t\tbooleanPredicate.parse(autocomplete);\n\n\t\tif (autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\tReflect.set(this, 'autocomplete', autocomplete);\n\n\t\treturn this;\n\t}\n}\n","import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandMentionableOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic toJSON(): APIApplicationCommandMentionableOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { z } from 'zod';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = z.number();\n\n@mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandNumberOption\n\textends ApplicationCommandOptionBase\n\timplements ApplicationCommandNumericOptionMinMaxValueMixin\n{\n\tpublic readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic setMaxValue(max: number): this {\n\t\tnumberValidator.parse(max);\n\n\t\tReflect.set(this, 'max_value', max);\n\n\t\treturn this;\n\t}\n\n\tpublic setMinValue(min: number): this {\n\t\tnumberValidator.parse(min);\n\n\t\tReflect.set(this, 'min_value', min);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandNumberOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandNumberOption\n\textends ApplicationCommandNumericOptionMinMaxValueMixin,\n\t\tApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {}\n","import { APIApplicationCommandRoleOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandRoleOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic toJSON(): APIApplicationCommandRoleOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Attachment as const;\n\n\tpublic toJSON(): APIApplicationCommandAttachmentOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { APIApplicationCommandStringOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\n@mix(ApplicationCommandOptionWithChoicesAndAutocompleteMixin)\nexport class SlashCommandStringOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic toJSON(): APIApplicationCommandStringOption {\n\t\tthis.runRequiredValidations();\n\n\t\tif (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {\n\t\t\tthrow new RangeError('Autocomplete and choices are mutually exclusive to each other.');\n\t\t}\n\n\t\treturn { ...this };\n\t}\n}\n\nexport interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesAndAutocompleteMixin<string> {}\n","import { APIApplicationCommandUserOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\n\nexport class SlashCommandUserOption extends ApplicationCommandOptionBase {\n\tpublic readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic toJSON(): APIApplicationCommandUserOption {\n\t\tthis.runRequiredValidations();\n\n\t\treturn { ...this };\n\t}\n}\n","import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandAttachmentOption } from '../options/attachment';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions<ShouldOmitSubcommandFunctions = true> {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds an attachment option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addAttachmentOption(\n\t\tinput: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput:\n\t\t\t| SlashCommandStringOption\n\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandStringOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandStringOption\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandStringOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput:\n\t\t\t| SlashCommandIntegerOption\n\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandIntegerOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandIntegerOption\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandIntegerOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput:\n\t\t\t| SlashCommandNumberOption\n\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>\n\t\t\t| ((\n\t\t\t\t\tbuilder: SlashCommandNumberOption,\n\t\t\t ) =>\n\t\t\t\t\t| SlashCommandNumberOption\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'setAutocomplete'>\n\t\t\t\t\t| Omit<SlashCommandNumberOption, 'addChoices'>),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod<T extends ApplicationCommandOptionBase>(\n\t\tinput:\n\t\t\t| T\n\t\t\t| Omit<T, 'setAutocomplete'>\n\t\t\t| Omit<T, 'addChoices'>\n\t\t\t| ((builder: T) => T | Omit<T, 'setAutocomplete'> | Omit<T, 'addChoices'>),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit<this, 'addSubcommand' | 'addSubcommandGroup'> : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n","import {\n\tAPIApplicationCommandSubcommandGroupOption,\n\tAPIApplicationCommandSubcommandOption,\n\tApplicationCommandOptionType,\n} from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport type { ApplicationCommandOptionBase } from './mixins/ApplicationCommandOptionBase';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SharedSlashCommandOptions } from './mixins/SharedSlashCommandOptions';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: SlashCommandSubcommandBuilder[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-use-before-define\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandSubcommandGroupOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ApplicationCommandOptionBase[] = [];\n\n\tpublic toJSON(): APIApplicationCommandSubcommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<false> {}\n","import { z } from 'zod';\nimport { ApplicationCommandType } from 'discord-api-types/v10';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder';\n\nconst namePredicate = z\n\t.string()\n\t.min(1)\n\t.max(32)\n\t.regex(/^( *[\\p{L}\\p{N}_-]+ *)+$/u);\n\nconst typePredicate = z.union([z.literal(ApplicationCommandType.User), z.literal(ApplicationCommandType.Message)]);\n\nconst booleanPredicate = z.boolean();\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tbooleanPredicate.parse(value);\n}\n\nexport function validateName(name: unknown): asserts name is string {\n\tnamePredicate.parse(name);\n}\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\ttypePredicate.parse(type);\n}\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n","import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions';\nimport type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v10';\n\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this context menu command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The type of this context menu command\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type\n\t *\n\t * @param type The type\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttype: this.type,\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n}\n\nexport type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message;\n","export interface JSONEncodable<T> {\n\t/**\n\t * Transforms this object to its JSON format\n\t */\n\ttoJSON: () => T;\n}\n\n/**\n * Indicates if an object is encodable or not.\n * @param maybeEncodable The object to check against\n */\nexport function isJSONEncodable(maybeEncodable: unknown): maybeEncodable is JSONEncodable<unknown> {\n\treturn maybeEncodable !== null && typeof maybeEncodable === 'object' && 'toJSON' in maybeEncodable;\n}\n","export interface Equatable<T> {\n\t/**\n\t * Whether or not this is equal to another structure\n\t */\n\tequals: (other: T) => boolean;\n}\n\n/**\n * Indicates if an object is equatable or not.\n * @param maybeEquatable The object to check against\n */\nexport function isEquatable(maybeEquatable: unknown): maybeEquatable is Equatable<unknown> {\n\treturn maybeEquatable !== null && typeof maybeEquatable === 'object' && 'equals' in maybeEquatable;\n}\n","import type { APIEmbed } from 'discord-api-types/v10';\n\nexport function embedLength(data: APIEmbed) {\n\treturn (\n\t\t(data.title?.length ?? 0) +\n\t\t(data.description?.length ?? 0) +\n\t\t(data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) +\n\t\t(data.footer?.text.length ?? 0) +\n\t\t(data.author?.name.length ?? 0)\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEO,IAAM,qBAAqB,EAAE,SAAS,IAAI,GAAG,IAAI;AAEjD,IAAM,sBAAsB,EAAE,SAAS,IAAI,GAAG,IAAI;AAElD,IAAM,uBAAuB,EAAE,UAAU;AAEzC,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC3C,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA;AAGF,IAAM,4BAA4B,oBAAoB;AAEtD,IAAM,uBAAuB,EAAE,SAAS,IAAI;AAE5C,6BAA6B,cAAsB,QAAgC;AACzF,uBAAqB,MAAO,SAAQ,UAAU,KAAK;AAAA;AADpC;AAIT,IAAM,sBAAsB,mBAAmB;AAE/C,IAAM,eAAe,EAAE,SAAS,MAAM;AAEtC,IAAM,eAAe,EAAE,SAAS,MAAM,IAAI,GAAG,IAAI;AACjD,IAAM,iBAAiB,EAC5B,SACA,MACA,IAAI,GACJ,IAAI,UACJ,WACA,GAAG,EAAE,MAAM,CAAC,cAAc,cAAc;AAEnC,IAAM,uBAAuB,EAAE,SAAS,IAAI,GAAG,IAAI,MAAM;AAEzD,IAAM,sBAAsB,EAAE,SAAS,IAAI,GAAG,IAAI,MAAM;AAExD,IAAM,qBAAqB,EAAE,MAAM,CAAC,EAAE,UAAU,EAAE,SAAS;AAE3D,IAAM,iBAAiB,mBAAmB;;;ACT1C,+BAAyB;AAAA,EAGxB,YAAY,OAAiB,IAAI;AAFxB;AAGf,SAAK,OAAO,KAAK;AACjB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1648515278-ac4bc3a",
3
+ "version": "0.13.0-dev.1649030892-5748dbe",
4
4
  "description": "A set of builders that you can use when creating your bot",
5
5
  "scripts": {
6
6
  "build": "tsup",