@discordjs/builders 1.1.0-dev.1658102995-dda2895 → 1.1.0
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/CHANGELOG.md +16 -0
- package/README.md +5 -2
- package/dist/components/ActionRow.cjs +32 -0
- package/dist/components/ActionRow.cjs.map +1 -0
- package/dist/components/ActionRow.d.ts +35 -0
- package/dist/components/ActionRow.d.ts.map +1 -0
- package/dist/components/ActionRow.mjs +28 -0
- package/dist/components/ActionRow.mjs.map +1 -0
- package/dist/components/Assertions.cjs +77 -0
- package/dist/components/Assertions.cjs.map +1 -0
- package/dist/components/Assertions.d.ts +48 -0
- package/dist/components/Assertions.d.ts.map +1 -0
- package/dist/components/Assertions.mjs +57 -0
- package/dist/components/Assertions.mjs.map +1 -0
- package/dist/components/Component.cjs +12 -0
- package/dist/components/Component.cjs.map +1 -0
- package/dist/components/Component.d.ts +15 -0
- package/dist/components/Component.d.ts.map +1 -0
- package/dist/components/Component.mjs +8 -0
- package/dist/components/Component.mjs.map +1 -0
- package/dist/components/Components.cjs +31 -0
- package/dist/components/Components.cjs.map +1 -0
- package/dist/components/Components.d.ts +21 -0
- package/dist/components/Components.d.ts.map +1 -0
- package/dist/components/Components.mjs +27 -0
- package/dist/components/Components.mjs.map +1 -0
- package/dist/components/button/Button.cjs +46 -0
- package/dist/components/button/Button.cjs.map +1 -0
- package/dist/components/button/Button.d.ts +46 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.mjs +42 -0
- package/dist/components/button/Button.mjs.map +1 -0
- package/dist/components/selectMenu/SelectMenu.cjs +59 -0
- package/dist/components/selectMenu/SelectMenu.cjs.map +1 -0
- package/dist/components/selectMenu/SelectMenu.d.ts +59 -0
- package/dist/components/selectMenu/SelectMenu.d.ts.map +1 -0
- package/dist/components/selectMenu/SelectMenu.mjs +55 -0
- package/dist/components/selectMenu/SelectMenu.mjs.map +1 -0
- package/dist/components/selectMenu/SelectMenuOption.cjs +40 -0
- package/dist/components/selectMenu/SelectMenuOption.cjs.map +1 -0
- package/dist/components/selectMenu/SelectMenuOption.d.ts +40 -0
- package/dist/components/selectMenu/SelectMenuOption.d.ts.map +1 -0
- package/dist/components/selectMenu/SelectMenuOption.mjs +36 -0
- package/dist/components/selectMenu/SelectMenuOption.mjs.map +1 -0
- package/dist/components/textInput/Assertions.cjs +31 -0
- package/dist/components/textInput/Assertions.cjs.map +1 -0
- package/dist/components/textInput/Assertions.d.ts +10 -0
- package/dist/components/textInput/Assertions.d.ts.map +1 -0
- package/dist/components/textInput/Assertions.mjs +20 -0
- package/dist/components/textInput/Assertions.mjs.map +1 -0
- package/dist/components/textInput/TextInput.cjs +67 -0
- package/dist/components/textInput/TextInput.cjs.map +1 -0
- package/dist/components/textInput/TextInput.d.ts +59 -0
- package/dist/components/textInput/TextInput.d.ts.map +1 -0
- package/dist/components/textInput/TextInput.mjs +59 -0
- package/dist/components/textInput/TextInput.mjs.map +1 -0
- package/dist/index.cjs +129 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +40 -1406
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +46 -1482
- package/dist/index.mjs.map +1 -1
- package/dist/interactions/contextMenuCommands/Assertions.cjs +40 -0
- package/dist/interactions/contextMenuCommands/Assertions.cjs.map +1 -0
- package/dist/interactions/contextMenuCommands/Assertions.d.ts +8 -0
- package/dist/interactions/contextMenuCommands/Assertions.d.ts.map +1 -0
- package/dist/interactions/contextMenuCommands/Assertions.mjs +31 -0
- package/dist/interactions/contextMenuCommands/Assertions.mjs.map +1 -0
- package/dist/interactions/contextMenuCommands/ContextMenuCommandBuilder.cjs +71 -0
- package/dist/interactions/contextMenuCommands/ContextMenuCommandBuilder.cjs.map +1 -0
- package/dist/interactions/contextMenuCommands/ContextMenuCommandBuilder.d.ts +94 -0
- package/dist/interactions/contextMenuCommands/ContextMenuCommandBuilder.d.ts.map +1 -0
- package/dist/interactions/contextMenuCommands/ContextMenuCommandBuilder.mjs +67 -0
- package/dist/interactions/contextMenuCommands/ContextMenuCommandBuilder.mjs.map +1 -0
- package/dist/interactions/modals/Assertions.cjs +21 -0
- package/dist/interactions/modals/Assertions.cjs.map +1 -0
- package/dist/interactions/modals/Assertions.d.ts +5 -0
- package/dist/interactions/modals/Assertions.d.ts.map +1 -0
- package/dist/interactions/modals/Assertions.mjs +15 -0
- package/dist/interactions/modals/Assertions.mjs.map +1 -0
- package/dist/interactions/modals/Modal.cjs +43 -0
- package/dist/interactions/modals/Modal.cjs.map +1 -0
- package/dist/interactions/modals/Modal.d.ts +35 -0
- package/dist/interactions/modals/Modal.d.ts.map +1 -0
- package/dist/interactions/modals/Modal.mjs +39 -0
- package/dist/interactions/modals/Modal.mjs.map +1 -0
- package/dist/interactions/slashCommands/Assertions.cjs +70 -0
- package/dist/interactions/slashCommands/Assertions.cjs.map +1 -0
- package/dist/interactions/slashCommands/Assertions.d.ts +18 -0
- package/dist/interactions/slashCommands/Assertions.d.ts.map +1 -0
- package/dist/interactions/slashCommands/Assertions.mjs +54 -0
- package/dist/interactions/slashCommands/Assertions.mjs.map +1 -0
- package/dist/interactions/slashCommands/SlashCommandBuilder.cjs +75 -0
- package/dist/interactions/slashCommands/SlashCommandBuilder.cjs.map +1 -0
- package/dist/interactions/slashCommands/SlashCommandBuilder.d.ts +100 -0
- package/dist/interactions/slashCommands/SlashCommandBuilder.d.ts.map +1 -0
- package/dist/interactions/slashCommands/SlashCommandBuilder.mjs +73 -0
- package/dist/interactions/slashCommands/SlashCommandBuilder.mjs.map +1 -0
- package/dist/interactions/slashCommands/SlashCommandSubcommands.cjs +72 -0
- package/dist/interactions/slashCommands/SlashCommandSubcommands.cjs.map +1 -0
- package/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts +56 -0
- package/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts.map +1 -0
- package/dist/interactions/slashCommands/SlashCommandSubcommands.mjs +70 -0
- package/dist/interactions/slashCommands/SlashCommandSubcommands.mjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.cjs +9 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.cjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.d.ts +17 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.d.ts.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.mjs +5 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.mjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionBase.cjs +27 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionBase.cjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionBase.d.ts +15 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionBase.d.ts.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionBase.mjs +23 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionBase.mjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.cjs +30 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.cjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.d.ts +14 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.d.ts.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.mjs +26 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.mjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.cjs +57 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.cjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.d.ts +19 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.d.ts.map +1 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.mjs +53 -0
- package/dist/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.mjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/NameAndDescription.cjs +65 -0
- package/dist/interactions/slashCommands/mixins/NameAndDescription.cjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts +46 -0
- package/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts.map +1 -0
- package/dist/interactions/slashCommands/mixins/NameAndDescription.mjs +61 -0
- package/dist/interactions/slashCommands/mixins/NameAndDescription.mjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.cjs +55 -0
- package/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.cjs.map +1 -0
- package/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.d.ts +69 -0
- package/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.d.ts.map +1 -0
- package/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.mjs +51 -0
- package/dist/interactions/slashCommands/mixins/SharedSlashCommandOptions.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/attachment.cjs +20 -0
- package/dist/interactions/slashCommands/options/attachment.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/attachment.d.ts +7 -0
- package/dist/interactions/slashCommands/options/attachment.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/attachment.mjs +16 -0
- package/dist/interactions/slashCommands/options/attachment.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/boolean.cjs +20 -0
- package/dist/interactions/slashCommands/options/boolean.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/boolean.d.ts +7 -0
- package/dist/interactions/slashCommands/options/boolean.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/boolean.mjs +16 -0
- package/dist/interactions/slashCommands/options/boolean.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/channel.cjs +34 -0
- package/dist/interactions/slashCommands/options/channel.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/channel.d.ts +10 -0
- package/dist/interactions/slashCommands/options/channel.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/channel.mjs +32 -0
- package/dist/interactions/slashCommands/options/channel.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/integer.cjs +50 -0
- package/dist/interactions/slashCommands/options/integer.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/integer.d.ts +13 -0
- package/dist/interactions/slashCommands/options/integer.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/integer.mjs +48 -0
- package/dist/interactions/slashCommands/options/integer.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/mentionable.cjs +20 -0
- package/dist/interactions/slashCommands/options/mentionable.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/mentionable.d.ts +7 -0
- package/dist/interactions/slashCommands/options/mentionable.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/mentionable.mjs +16 -0
- package/dist/interactions/slashCommands/options/mentionable.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/number.cjs +50 -0
- package/dist/interactions/slashCommands/options/number.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/number.d.ts +13 -0
- package/dist/interactions/slashCommands/options/number.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/number.mjs +48 -0
- package/dist/interactions/slashCommands/options/number.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/role.cjs +20 -0
- package/dist/interactions/slashCommands/options/role.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/role.d.ts +7 -0
- package/dist/interactions/slashCommands/options/role.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/role.mjs +16 -0
- package/dist/interactions/slashCommands/options/role.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/string.cjs +50 -0
- package/dist/interactions/slashCommands/options/string.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/string.d.ts +24 -0
- package/dist/interactions/slashCommands/options/string.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/string.mjs +48 -0
- package/dist/interactions/slashCommands/options/string.mjs.map +1 -0
- package/dist/interactions/slashCommands/options/user.cjs +20 -0
- package/dist/interactions/slashCommands/options/user.cjs.map +1 -0
- package/dist/interactions/slashCommands/options/user.d.ts +7 -0
- package/dist/interactions/slashCommands/options/user.d.ts.map +1 -0
- package/dist/interactions/slashCommands/options/user.mjs +16 -0
- package/dist/interactions/slashCommands/options/user.mjs.map +1 -0
- package/dist/messages/embed/Assertions.cjs +62 -0
- package/dist/messages/embed/Assertions.cjs.map +1 -0
- package/dist/messages/embed/Assertions.d.ts +50 -0
- package/dist/messages/embed/Assertions.d.ts.map +1 -0
- package/dist/messages/embed/Assertions.mjs +41 -0
- package/dist/messages/embed/Assertions.mjs.map +1 -0
- package/dist/messages/embed/Embed.cjs +101 -0
- package/dist/messages/embed/Embed.cjs.map +1 -0
- package/dist/messages/embed/Embed.d.ts +108 -0
- package/dist/messages/embed/Embed.d.ts.map +1 -0
- package/dist/messages/embed/Embed.mjs +97 -0
- package/dist/messages/embed/Embed.mjs.map +1 -0
- package/dist/messages/formatters.cjs +102 -0
- package/dist/messages/formatters.cjs.map +1 -0
- package/dist/messages/formatters.d.ts +246 -0
- package/dist/messages/formatters.d.ts.map +1 -0
- package/dist/messages/formatters.mjs +79 -0
- package/dist/messages/formatters.mjs.map +1 -0
- package/dist/util/componentUtil.cjs +10 -0
- package/dist/util/componentUtil.cjs.map +1 -0
- package/dist/util/componentUtil.d.ts +3 -0
- package/dist/util/componentUtil.d.ts.map +1 -0
- package/dist/util/componentUtil.mjs +6 -0
- package/dist/util/componentUtil.mjs.map +1 -0
- package/dist/util/equatable.cjs +10 -0
- package/dist/util/equatable.cjs.map +1 -0
- package/dist/util/equatable.d.ts +12 -0
- package/dist/util/equatable.d.ts.map +1 -0
- package/dist/util/equatable.mjs +6 -0
- package/dist/util/equatable.mjs.map +1 -0
- package/dist/util/jsonEncodable.cjs +10 -0
- package/dist/util/jsonEncodable.cjs.map +1 -0
- package/dist/util/jsonEncodable.d.ts +12 -0
- package/dist/util/jsonEncodable.d.ts.map +1 -0
- package/dist/util/jsonEncodable.mjs +6 -0
- package/dist/util/jsonEncodable.mjs.map +1 -0
- package/dist/util/normalizeArray.cjs +12 -0
- package/dist/util/normalizeArray.cjs.map +1 -0
- package/dist/util/normalizeArray.d.ts +3 -0
- package/dist/util/normalizeArray.d.ts.map +1 -0
- package/dist/util/normalizeArray.mjs +8 -0
- package/dist/util/normalizeArray.mjs.map +1 -0
- package/dist/util/validation.cjs +13 -0
- package/dist/util/validation.cjs.map +1 -0
- package/dist/util/validation.d.ts +4 -0
- package/dist/util/validation.d.ts.map +1 -0
- package/dist/util/validation.mjs +7 -0
- package/dist/util/validation.mjs.map +1 -0
- package/package.json +17 -16
- package/dist/index.js +0 -1557
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SharedSlashCommandOptions.mjs","sources":["../../../../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts"],"sourcesContent":["import type { ApplicationCommandOptionBase } from './ApplicationCommandOptionBase';\nimport { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandAttachmentOption } from '../options/attachment';\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 { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\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"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,yBAAyB,CAAC;AACvC,EAAE,gBAAgB,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC;AACzE,GAAG;AACH,EAAE,aAAa,CAAC,KAAK,EAAE;AACvB,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC;AACtE,GAAG;AACH,EAAE,gBAAgB,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC;AACzE,GAAG;AACH,EAAE,aAAa,CAAC,KAAK,EAAE;AACvB,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,CAAC,CAAC;AACtE,GAAG;AACH,EAAE,mBAAmB,CAAC,KAAK,EAAE;AAC7B,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,4BAA4B,CAAC,CAAC;AAC5E,GAAG;AACH,EAAE,oBAAoB,CAAC,KAAK,EAAE;AAC9B,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,6BAA6B,CAAC,CAAC;AAC7E,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;AACxE,GAAG;AACH,EAAE,gBAAgB,CAAC,KAAK,EAAE;AAC1B,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC;AACzE,GAAG;AACH,EAAE,eAAe,CAAC,KAAK,EAAE;AACzB,IAAI,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC;AACxE,GAAG;AACH,EAAE,sBAAsB,CAAC,KAAK,EAAE,QAAQ,EAAE;AAC1C,IAAI,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;AAC7B,IAAI,wBAAwB,CAAC,OAAO,CAAC,CAAC;AACtC,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,UAAU,GAAG,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC,GAAG,KAAK,CAAC;AAC/E,IAAI,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC5C,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACzB,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const v10 = require('discord-api-types/v10');
|
|
6
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
7
|
+
|
|
8
|
+
class SlashCommandAttachmentOption extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = v10.ApplicationCommandOptionType.Attachment;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
this.runRequiredValidations();
|
|
15
|
+
return { ...this };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.SlashCommandAttachmentOption = SlashCommandAttachmentOption;
|
|
20
|
+
//# sourceMappingURL=attachment.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.cjs","sources":["../../../../src/interactions/slashCommands/options/attachment.ts"],"sourcesContent":["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"],"names":["ApplicationCommandOptionBase","ApplicationCommandOptionType"],"mappings":";;;;;;;AAEO,MAAM,4BAA4B,SAASA,yDAA4B,CAAC;AAC/E,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,UAAU,CAAC;AACxD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { APIApplicationCommandAttachmentOption, ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';
|
|
3
|
+
export declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {
|
|
4
|
+
readonly type: ApplicationCommandOptionType.Attachment;
|
|
5
|
+
toJSON(): APIApplicationCommandAttachmentOption;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=attachment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.d.ts","sourceRoot":"","sources":["../../../../src/interactions/slashCommands/options/attachment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF,qBAAa,4BAA6B,SAAQ,4BAA4B;IAC7E,SAAyB,IAAI,0CAAoD;IAE1E,MAAM,IAAI,qCAAqC;CAKtD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.mjs';
|
|
3
|
+
|
|
4
|
+
class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.type = ApplicationCommandOptionType.Attachment;
|
|
8
|
+
}
|
|
9
|
+
toJSON() {
|
|
10
|
+
this.runRequiredValidations();
|
|
11
|
+
return { ...this };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SlashCommandAttachmentOption };
|
|
16
|
+
//# sourceMappingURL=attachment.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachment.mjs","sources":["../../../../src/interactions/slashCommands/options/attachment.ts"],"sourcesContent":["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"],"names":[],"mappings":";;;AAEO,MAAM,4BAA4B,SAAS,4BAA4B,CAAC;AAC/E,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,UAAU,CAAC;AACxD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const v10 = require('discord-api-types/v10');
|
|
6
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
7
|
+
|
|
8
|
+
class SlashCommandBooleanOption extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = v10.ApplicationCommandOptionType.Boolean;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
this.runRequiredValidations();
|
|
15
|
+
return { ...this };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.SlashCommandBooleanOption = SlashCommandBooleanOption;
|
|
20
|
+
//# sourceMappingURL=boolean.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean.cjs","sources":["../../../../src/interactions/slashCommands/options/boolean.ts"],"sourcesContent":["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"],"names":["ApplicationCommandOptionBase","ApplicationCommandOptionType"],"mappings":";;;;;;;AAEO,MAAM,yBAAyB,SAASA,yDAA4B,CAAC;AAC5E,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,OAAO,CAAC;AACrD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { APIApplicationCommandBooleanOption, ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';
|
|
3
|
+
export declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
|
|
4
|
+
readonly type: ApplicationCommandOptionType.Boolean;
|
|
5
|
+
toJSON(): APIApplicationCommandBooleanOption;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=boolean.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../../../src/interactions/slashCommands/options/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACzG,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF,qBAAa,yBAA0B,SAAQ,4BAA4B;IAC1E,SAAgB,IAAI,uCAAiD;IAE9D,MAAM,IAAI,kCAAkC;CAKnD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.mjs';
|
|
3
|
+
|
|
4
|
+
class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.type = ApplicationCommandOptionType.Boolean;
|
|
8
|
+
}
|
|
9
|
+
toJSON() {
|
|
10
|
+
this.runRequiredValidations();
|
|
11
|
+
return { ...this };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SlashCommandBooleanOption };
|
|
16
|
+
//# sourceMappingURL=boolean.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boolean.mjs","sources":["../../../../src/interactions/slashCommands/options/boolean.ts"],"sourcesContent":["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"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,SAAS,4BAA4B,CAAC;AAC5E,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,OAAO,CAAC;AACrD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const v10 = require('discord-api-types/v10');
|
|
6
|
+
const tsMixer = require('ts-mixer');
|
|
7
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
8
|
+
const ApplicationCommandOptionChannelTypesMixin = require('../mixins/ApplicationCommandOptionChannelTypesMixin.cjs');
|
|
9
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
13
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
14
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
15
|
+
if (decorator = decorators[i])
|
|
16
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
17
|
+
if (kind && result)
|
|
18
|
+
__defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
exports.SlashCommandChannelOption = class extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.type = v10.ApplicationCommandOptionType.Channel;
|
|
25
|
+
}
|
|
26
|
+
toJSON() {
|
|
27
|
+
this.runRequiredValidations();
|
|
28
|
+
return { ...this };
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.SlashCommandChannelOption = __decorateClass([
|
|
32
|
+
tsMixer.mix(ApplicationCommandOptionChannelTypesMixin.ApplicationCommandOptionChannelTypesMixin)
|
|
33
|
+
], exports.SlashCommandChannelOption);
|
|
34
|
+
//# sourceMappingURL=channel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.cjs","sources":["../../../../src/interactions/slashCommands/options/channel.ts"],"sourcesContent":["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"],"names":["SlashCommandChannelOption","ApplicationCommandOptionBase","ApplicationCommandOptionType","mix","ApplicationCommandOptionChannelTypesMixin"],"mappings":";;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvD,IAAI,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK;AACzD,EAAE,IAAI,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AACjF,EAAE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAC5D,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC;AACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACrF,EAAE,IAAI,IAAI,IAAI,MAAM;AACpB,IAAI,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAKSA,iCAAyB,GAAG,cAAcC,yDAA4B,CAAC;AAClF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,OAAO,CAAC;AACrD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACFF,iCAAyB,GAAG,eAAe,CAAC;AAC5C,EAAEG,WAAG,CAACC,mFAAyC,CAAC;AAChD,CAAC,EAAEJ,iCAAyB,CAAC;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { APIApplicationCommandChannelOption, ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';
|
|
3
|
+
import { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin';
|
|
4
|
+
export declare class SlashCommandChannelOption extends ApplicationCommandOptionBase {
|
|
5
|
+
readonly type: ApplicationCommandOptionType.Channel;
|
|
6
|
+
toJSON(): APIApplicationCommandChannelOption;
|
|
7
|
+
}
|
|
8
|
+
export interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../../src/interactions/slashCommands/options/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAEzG,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,yCAAyC,EAAE,MAAM,qDAAqD,CAAC;AAEhH,qBACa,yBAA0B,SAAQ,4BAA4B;IAC1E,SAAyB,IAAI,uCAAiD;IAEvE,MAAM,IAAI,kCAAkC;CAKnD;AAED,MAAM,WAAW,yBAA0B,SAAQ,yCAAyC;CAAG"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { mix } from 'ts-mixer';
|
|
3
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.mjs';
|
|
4
|
+
import { ApplicationCommandOptionChannelTypesMixin } from '../mixins/ApplicationCommandOptionChannelTypesMixin.mjs';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
8
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
10
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
+
if (decorator = decorators[i])
|
|
12
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
13
|
+
if (kind && result)
|
|
14
|
+
__defProp(target, key, result);
|
|
15
|
+
return result;
|
|
16
|
+
};
|
|
17
|
+
let SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.type = ApplicationCommandOptionType.Channel;
|
|
21
|
+
}
|
|
22
|
+
toJSON() {
|
|
23
|
+
this.runRequiredValidations();
|
|
24
|
+
return { ...this };
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
SlashCommandChannelOption = __decorateClass([
|
|
28
|
+
mix(ApplicationCommandOptionChannelTypesMixin)
|
|
29
|
+
], SlashCommandChannelOption);
|
|
30
|
+
|
|
31
|
+
export { SlashCommandChannelOption };
|
|
32
|
+
//# sourceMappingURL=channel.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.mjs","sources":["../../../../src/interactions/slashCommands/options/channel.ts"],"sourcesContent":["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"],"names":[],"mappings":";;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvD,IAAI,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK;AACzD,EAAE,IAAI,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AACjF,EAAE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAC5D,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC;AACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACrF,EAAE,IAAI,IAAI,IAAI,MAAM;AACpB,IAAI,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAKQ,IAAC,yBAAyB,GAAG,cAAc,4BAA4B,CAAC;AAClF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,OAAO,CAAC;AACrD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACF,yBAAyB,GAAG,eAAe,CAAC;AAC5C,EAAE,GAAG,CAAC,yCAAyC,CAAC;AAChD,CAAC,EAAE,yBAAyB,CAAC;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const shapeshift = require('@sapphire/shapeshift');
|
|
6
|
+
const v10 = require('discord-api-types/v10');
|
|
7
|
+
const tsMixer = require('ts-mixer');
|
|
8
|
+
const ApplicationCommandNumericOptionMinMaxValueMixin = require('../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.cjs');
|
|
9
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
10
|
+
const ApplicationCommandOptionWithChoicesAndAutocompleteMixin = require('../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.cjs');
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
const numberValidator = shapeshift.s.number.int;
|
|
24
|
+
exports.SlashCommandIntegerOption = class extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.type = v10.ApplicationCommandOptionType.Integer;
|
|
28
|
+
}
|
|
29
|
+
setMaxValue(max) {
|
|
30
|
+
numberValidator.parse(max);
|
|
31
|
+
Reflect.set(this, "max_value", max);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
setMinValue(min) {
|
|
35
|
+
numberValidator.parse(min);
|
|
36
|
+
Reflect.set(this, "min_value", min);
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
toJSON() {
|
|
40
|
+
this.runRequiredValidations();
|
|
41
|
+
if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
|
|
42
|
+
throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
|
|
43
|
+
}
|
|
44
|
+
return { ...this };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.SlashCommandIntegerOption = __decorateClass([
|
|
48
|
+
tsMixer.mix(ApplicationCommandNumericOptionMinMaxValueMixin.ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
|
|
49
|
+
], exports.SlashCommandIntegerOption);
|
|
50
|
+
//# sourceMappingURL=integer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integer.cjs","sources":["../../../../src/interactions/slashCommands/options/integer.ts"],"sourcesContent":["import { s } from '@sapphire/shapeshift';\nimport { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = s.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"],"names":["s","SlashCommandIntegerOption","ApplicationCommandOptionBase","ApplicationCommandOptionType","mix","ApplicationCommandNumericOptionMinMaxValueMixin","ApplicationCommandOptionWithChoicesAndAutocompleteMixin"],"mappings":";;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvD,IAAI,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK;AACzD,EAAE,IAAI,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AACjF,EAAE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAC5D,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC;AACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACrF,EAAE,IAAI,IAAI,IAAI,MAAM;AACpB,IAAI,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAOF,MAAM,eAAe,GAAGA,YAAC,CAAC,MAAM,CAAC,GAAG,CAAC;AAC1BC,iCAAyB,GAAG,cAAcC,yDAA4B,CAAC;AAClF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,OAAO,CAAC;AACrD,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,IAAI,IAAI,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACrF,MAAM,MAAM,IAAI,UAAU,CAAC,gEAAgE,CAAC,CAAC;AAC7F,KAAK;AACL,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACFF,iCAAyB,GAAG,eAAe,CAAC;AAC5C,EAAEG,WAAG,CAACC,+FAA+C,EAAEC,+GAAuD,CAAC;AAC/G,CAAC,EAAEL,iCAAyB,CAAC;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';
|
|
3
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';
|
|
4
|
+
import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';
|
|
5
|
+
export declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
|
|
6
|
+
readonly type: ApplicationCommandOptionType.Integer;
|
|
7
|
+
setMaxValue(max: number): this;
|
|
8
|
+
setMinValue(min: number): this;
|
|
9
|
+
toJSON(): APIApplicationCommandIntegerOption;
|
|
10
|
+
}
|
|
11
|
+
export interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=integer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integer.d.ts","sourceRoot":"","sources":["../../../../src/interactions/slashCommands/options/integer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAEzG,OAAO,EAAE,+CAA+C,EAAE,MAAM,2DAA2D,CAAC;AAC5H,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,uDAAuD,EAAE,MAAM,mEAAmE,CAAC;AAI5I,qBACa,yBACZ,SAAQ,4BACR,YAAW,+CAA+C;IAE1D,SAAgB,IAAI,uCAAiD;IAE9D,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQ9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQ9B,MAAM,IAAI,kCAAkC;CASnD;AAED,MAAM,WAAW,yBAChB,SAAQ,+CAA+C,EACtD,uDAAuD,CAAC,MAAM,CAAC;CAAG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { s } from '@sapphire/shapeshift';
|
|
2
|
+
import { ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
3
|
+
import { mix } from 'ts-mixer';
|
|
4
|
+
import { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.mjs';
|
|
5
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.mjs';
|
|
6
|
+
import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.mjs';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result)
|
|
16
|
+
__defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const numberValidator = s.number.int;
|
|
20
|
+
let SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.type = ApplicationCommandOptionType.Integer;
|
|
24
|
+
}
|
|
25
|
+
setMaxValue(max) {
|
|
26
|
+
numberValidator.parse(max);
|
|
27
|
+
Reflect.set(this, "max_value", max);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
setMinValue(min) {
|
|
31
|
+
numberValidator.parse(min);
|
|
32
|
+
Reflect.set(this, "min_value", min);
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
toJSON() {
|
|
36
|
+
this.runRequiredValidations();
|
|
37
|
+
if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
|
|
38
|
+
throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
|
|
39
|
+
}
|
|
40
|
+
return { ...this };
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
SlashCommandIntegerOption = __decorateClass([
|
|
44
|
+
mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
|
|
45
|
+
], SlashCommandIntegerOption);
|
|
46
|
+
|
|
47
|
+
export { SlashCommandIntegerOption };
|
|
48
|
+
//# sourceMappingURL=integer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integer.mjs","sources":["../../../../src/interactions/slashCommands/options/integer.ts"],"sourcesContent":["import { s } from '@sapphire/shapeshift';\nimport { APIApplicationCommandIntegerOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = s.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"],"names":[],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvD,IAAI,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK;AACzD,EAAE,IAAI,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AACjF,EAAE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAC5D,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC;AACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACrF,EAAE,IAAI,IAAI,IAAI,MAAM;AACpB,IAAI,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAOF,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;AAC3B,IAAC,yBAAyB,GAAG,cAAc,4BAA4B,CAAC;AAClF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,OAAO,CAAC;AACrD,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,IAAI,IAAI,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACrF,MAAM,MAAM,IAAI,UAAU,CAAC,gEAAgE,CAAC,CAAC;AAC7F,KAAK;AACL,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACF,yBAAyB,GAAG,eAAe,CAAC;AAC5C,EAAE,GAAG,CAAC,+CAA+C,EAAE,uDAAuD,CAAC;AAC/G,CAAC,EAAE,yBAAyB,CAAC;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const v10 = require('discord-api-types/v10');
|
|
6
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
7
|
+
|
|
8
|
+
class SlashCommandMentionableOption extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = v10.ApplicationCommandOptionType.Mentionable;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
this.runRequiredValidations();
|
|
15
|
+
return { ...this };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.SlashCommandMentionableOption = SlashCommandMentionableOption;
|
|
20
|
+
//# sourceMappingURL=mentionable.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentionable.cjs","sources":["../../../../src/interactions/slashCommands/options/mentionable.ts"],"sourcesContent":["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"],"names":["ApplicationCommandOptionBase","ApplicationCommandOptionType"],"mappings":";;;;;;;AAEO,MAAM,6BAA6B,SAASA,yDAA4B,CAAC;AAChF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,WAAW,CAAC;AACzD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { APIApplicationCommandMentionableOption, ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';
|
|
3
|
+
export declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase {
|
|
4
|
+
readonly type: ApplicationCommandOptionType.Mentionable;
|
|
5
|
+
toJSON(): APIApplicationCommandMentionableOption;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=mentionable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentionable.d.ts","sourceRoot":"","sources":["../../../../src/interactions/slashCommands/options/mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC7G,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAEtF,qBAAa,6BAA8B,SAAQ,4BAA4B;IAC9E,SAAgB,IAAI,2CAAqD;IAElE,MAAM,IAAI,sCAAsC;CAKvD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.mjs';
|
|
3
|
+
|
|
4
|
+
class SlashCommandMentionableOption extends ApplicationCommandOptionBase {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.type = ApplicationCommandOptionType.Mentionable;
|
|
8
|
+
}
|
|
9
|
+
toJSON() {
|
|
10
|
+
this.runRequiredValidations();
|
|
11
|
+
return { ...this };
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { SlashCommandMentionableOption };
|
|
16
|
+
//# sourceMappingURL=mentionable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentionable.mjs","sources":["../../../../src/interactions/slashCommands/options/mentionable.ts"],"sourcesContent":["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"],"names":[],"mappings":";;;AAEO,MAAM,6BAA6B,SAAS,4BAA4B,CAAC;AAChF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,WAAW,CAAC;AACzD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const shapeshift = require('@sapphire/shapeshift');
|
|
6
|
+
const v10 = require('discord-api-types/v10');
|
|
7
|
+
const tsMixer = require('ts-mixer');
|
|
8
|
+
const ApplicationCommandNumericOptionMinMaxValueMixin = require('../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.cjs');
|
|
9
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
10
|
+
const ApplicationCommandOptionWithChoicesAndAutocompleteMixin = require('../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.cjs');
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
const numberValidator = shapeshift.s.number;
|
|
24
|
+
exports.SlashCommandNumberOption = class extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
25
|
+
constructor() {
|
|
26
|
+
super(...arguments);
|
|
27
|
+
this.type = v10.ApplicationCommandOptionType.Number;
|
|
28
|
+
}
|
|
29
|
+
setMaxValue(max) {
|
|
30
|
+
numberValidator.parse(max);
|
|
31
|
+
Reflect.set(this, "max_value", max);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
setMinValue(min) {
|
|
35
|
+
numberValidator.parse(min);
|
|
36
|
+
Reflect.set(this, "min_value", min);
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
39
|
+
toJSON() {
|
|
40
|
+
this.runRequiredValidations();
|
|
41
|
+
if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
|
|
42
|
+
throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
|
|
43
|
+
}
|
|
44
|
+
return { ...this };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
exports.SlashCommandNumberOption = __decorateClass([
|
|
48
|
+
tsMixer.mix(ApplicationCommandNumericOptionMinMaxValueMixin.ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
|
|
49
|
+
], exports.SlashCommandNumberOption);
|
|
50
|
+
//# sourceMappingURL=number.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.cjs","sources":["../../../../src/interactions/slashCommands/options/number.ts"],"sourcesContent":["import { s } from '@sapphire/shapeshift';\nimport { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = s.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"],"names":["s","SlashCommandNumberOption","ApplicationCommandOptionBase","ApplicationCommandOptionType","mix","ApplicationCommandNumericOptionMinMaxValueMixin","ApplicationCommandOptionWithChoicesAndAutocompleteMixin"],"mappings":";;;;;;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvD,IAAI,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK;AACzD,EAAE,IAAI,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AACjF,EAAE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAC5D,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC;AACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACrF,EAAE,IAAI,IAAI,IAAI,MAAM;AACpB,IAAI,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAOF,MAAM,eAAe,GAAGA,YAAC,CAAC,MAAM,CAAC;AACtBC,gCAAwB,GAAG,cAAcC,yDAA4B,CAAC;AACjF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,MAAM,CAAC;AACpD,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,IAAI,IAAI,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACrF,MAAM,MAAM,IAAI,UAAU,CAAC,gEAAgE,CAAC,CAAC;AAC7F,KAAK;AACL,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACFF,gCAAwB,GAAG,eAAe,CAAC;AAC3C,EAAEG,WAAG,CAACC,+FAA+C,EAAEC,+GAAuD,CAAC;AAC/G,CAAC,EAAEL,gCAAwB,CAAC;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
2
|
+
import { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';
|
|
3
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';
|
|
4
|
+
import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';
|
|
5
|
+
export declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
|
|
6
|
+
readonly type: ApplicationCommandOptionType.Number;
|
|
7
|
+
setMaxValue(max: number): this;
|
|
8
|
+
setMinValue(min: number): this;
|
|
9
|
+
toJSON(): APIApplicationCommandNumberOption;
|
|
10
|
+
}
|
|
11
|
+
export interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin<number> {
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../src/interactions/slashCommands/options/number.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAExG,OAAO,EAAE,+CAA+C,EAAE,MAAM,2DAA2D,CAAC;AAC5H,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,uDAAuD,EAAE,MAAM,mEAAmE,CAAC;AAI5I,qBACa,wBACZ,SAAQ,4BACR,YAAW,+CAA+C;IAE1D,SAAgB,IAAI,sCAAgD;IAE7D,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQ9B,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQ9B,MAAM,IAAI,iCAAiC;CASlD;AAED,MAAM,WAAW,wBAChB,SAAQ,+CAA+C,EACtD,uDAAuD,CAAC,MAAM,CAAC;CAAG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { s } from '@sapphire/shapeshift';
|
|
2
|
+
import { ApplicationCommandOptionType } from 'discord-api-types/v10';
|
|
3
|
+
import { mix } from 'ts-mixer';
|
|
4
|
+
import { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin.mjs';
|
|
5
|
+
import { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase.mjs';
|
|
6
|
+
import { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.mjs';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
15
|
+
if (kind && result)
|
|
16
|
+
__defProp(target, key, result);
|
|
17
|
+
return result;
|
|
18
|
+
};
|
|
19
|
+
const numberValidator = s.number;
|
|
20
|
+
let SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.type = ApplicationCommandOptionType.Number;
|
|
24
|
+
}
|
|
25
|
+
setMaxValue(max) {
|
|
26
|
+
numberValidator.parse(max);
|
|
27
|
+
Reflect.set(this, "max_value", max);
|
|
28
|
+
return this;
|
|
29
|
+
}
|
|
30
|
+
setMinValue(min) {
|
|
31
|
+
numberValidator.parse(min);
|
|
32
|
+
Reflect.set(this, "min_value", min);
|
|
33
|
+
return this;
|
|
34
|
+
}
|
|
35
|
+
toJSON() {
|
|
36
|
+
this.runRequiredValidations();
|
|
37
|
+
if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
|
|
38
|
+
throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
|
|
39
|
+
}
|
|
40
|
+
return { ...this };
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
SlashCommandNumberOption = __decorateClass([
|
|
44
|
+
mix(ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesAndAutocompleteMixin)
|
|
45
|
+
], SlashCommandNumberOption);
|
|
46
|
+
|
|
47
|
+
export { SlashCommandNumberOption };
|
|
48
|
+
//# sourceMappingURL=number.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.mjs","sources":["../../../../src/interactions/slashCommands/options/number.ts"],"sourcesContent":["import { s } from '@sapphire/shapeshift';\nimport { APIApplicationCommandNumberOption, ApplicationCommandOptionType } from 'discord-api-types/v10';\nimport { mix } from 'ts-mixer';\nimport { ApplicationCommandNumericOptionMinMaxValueMixin } from '../mixins/ApplicationCommandNumericOptionMinMaxValueMixin';\nimport { ApplicationCommandOptionBase } from '../mixins/ApplicationCommandOptionBase';\nimport { ApplicationCommandOptionWithChoicesAndAutocompleteMixin } from '../mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin';\n\nconst numberValidator = s.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"],"names":[],"mappings":";;;;;;;AAAA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC;AACtC,IAAI,gBAAgB,GAAG,MAAM,CAAC,wBAAwB,CAAC;AACvD,IAAI,eAAe,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK;AACzD,EAAE,IAAI,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,GAAG,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AACjF,EAAE,KAAK,IAAI,CAAC,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;AAC5D,IAAI,IAAI,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC;AACjC,MAAM,MAAM,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC;AACrF,EAAE,IAAI,IAAI,IAAI,MAAM;AACpB,IAAI,SAAS,CAAC,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;AACnC,EAAE,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAOF,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;AACvB,IAAC,wBAAwB,GAAG,cAAc,4BAA4B,CAAC;AACjF,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC,MAAM,CAAC;AACpD,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC;AACxC,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,IAAI,IAAI,CAAC,YAAY,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AACrF,MAAM,MAAM,IAAI,UAAU,CAAC,gEAAgE,CAAC,CAAC;AAC7F,KAAK;AACL,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH,EAAE;AACF,wBAAwB,GAAG,eAAe,CAAC;AAC3C,EAAE,GAAG,CAAC,+CAA+C,EAAE,uDAAuD,CAAC;AAC/G,CAAC,EAAE,wBAAwB,CAAC;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const v10 = require('discord-api-types/v10');
|
|
6
|
+
const ApplicationCommandOptionBase = require('../mixins/ApplicationCommandOptionBase.cjs');
|
|
7
|
+
|
|
8
|
+
class SlashCommandRoleOption extends ApplicationCommandOptionBase.ApplicationCommandOptionBase {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = v10.ApplicationCommandOptionType.Role;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
this.runRequiredValidations();
|
|
15
|
+
return { ...this };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.SlashCommandRoleOption = SlashCommandRoleOption;
|
|
20
|
+
//# sourceMappingURL=role.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.cjs","sources":["../../../../src/interactions/slashCommands/options/role.ts"],"sourcesContent":["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"],"names":["ApplicationCommandOptionBase","ApplicationCommandOptionType"],"mappings":";;;;;;;AAEO,MAAM,sBAAsB,SAASA,yDAA4B,CAAC;AACzE,EAAE,WAAW,GAAG;AAChB,IAAI,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,IAAI,IAAI,CAAC,IAAI,GAAGC,gCAA4B,CAAC,IAAI,CAAC;AAClD,GAAG;AACH,EAAE,MAAM,GAAG;AACX,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;AAClC,IAAI,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC;AACvB,GAAG;AACH;;;;"}
|