@discordjs/builders 1.8.0 → 1.8.1-dev.1714910616-07c12101e
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.mts +60 -53
- package/dist/index.d.ts +60 -53
- package/dist/index.js +84 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -74
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sapphire_shapeshift from '@sapphire/shapeshift';
|
|
2
|
-
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, Snowflake, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption,
|
|
2
|
+
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, Snowflake, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
|
|
3
3
|
export * from '@discordjs/formatters';
|
|
4
4
|
import { JSONEncodable, Equatable } from '@discordjs/util';
|
|
5
5
|
|
|
@@ -928,7 +928,7 @@ declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> i
|
|
|
928
928
|
*/
|
|
929
929
|
toJSON(): APITextInputComponent;
|
|
930
930
|
/**
|
|
931
|
-
*
|
|
931
|
+
* Whether this is equal to another structure.
|
|
932
932
|
*/
|
|
933
933
|
equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean;
|
|
934
934
|
}
|
|
@@ -1208,6 +1208,59 @@ declare class SharedNameAndDescription {
|
|
|
1208
1208
|
setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this;
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
|
+
/**
|
|
1212
|
+
* This mixin holds symbols that can be shared in slashcommands independent of options or subcommands.
|
|
1213
|
+
*/
|
|
1214
|
+
declare class SharedSlashCommand {
|
|
1215
|
+
readonly name: string;
|
|
1216
|
+
readonly name_localizations?: LocalizationMap;
|
|
1217
|
+
readonly description: string;
|
|
1218
|
+
readonly description_localizations?: LocalizationMap;
|
|
1219
|
+
readonly options: ToAPIApplicationCommandOptions[];
|
|
1220
|
+
/**
|
|
1221
|
+
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1222
|
+
*
|
|
1223
|
+
* @remarks
|
|
1224
|
+
* If set to `false`, you will have to later `PUT` the permissions for this command.
|
|
1225
|
+
* @param value - Whether or not to enable this command by default
|
|
1226
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1227
|
+
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1228
|
+
*/
|
|
1229
|
+
setDefaultPermission(value: boolean): this;
|
|
1230
|
+
/**
|
|
1231
|
+
* Sets the default permissions a member should have in order to run the command.
|
|
1232
|
+
*
|
|
1233
|
+
* @remarks
|
|
1234
|
+
* You can set this to `'0'` to disable the command by default.
|
|
1235
|
+
* @param permissions - The permissions bit field to set
|
|
1236
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1237
|
+
*/
|
|
1238
|
+
setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
|
|
1239
|
+
/**
|
|
1240
|
+
* Sets if the command is available in direct messages with the application.
|
|
1241
|
+
*
|
|
1242
|
+
* @remarks
|
|
1243
|
+
* By default, commands are visible. This method is only for global commands.
|
|
1244
|
+
* @param enabled - Whether the command should be enabled in direct messages
|
|
1245
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1246
|
+
*/
|
|
1247
|
+
setDMPermission(enabled: boolean | null | undefined): this;
|
|
1248
|
+
/**
|
|
1249
|
+
* Sets whether this command is NSFW.
|
|
1250
|
+
*
|
|
1251
|
+
* @param nsfw - Whether this command is NSFW
|
|
1252
|
+
*/
|
|
1253
|
+
setNSFW(nsfw?: boolean): this;
|
|
1254
|
+
/**
|
|
1255
|
+
* Serializes this builder to API-compatible JSON data.
|
|
1256
|
+
*
|
|
1257
|
+
* @remarks
|
|
1258
|
+
* This method runs validations on the data before serializing it.
|
|
1259
|
+
* As such, it may throw an error if the data is invalid.
|
|
1260
|
+
*/
|
|
1261
|
+
toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1211
1264
|
/**
|
|
1212
1265
|
* The base application command option builder that contains common symbols for application command builders.
|
|
1213
1266
|
*/
|
|
@@ -1657,45 +1710,7 @@ interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, Shared
|
|
|
1657
1710
|
* @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group.
|
|
1658
1711
|
*/
|
|
1659
1712
|
declare class SharedSlashCommandSubcommands<TypeAfterAddingSubcommands extends SharedSlashCommandSubcommands<TypeAfterAddingSubcommands>> {
|
|
1660
|
-
readonly name: string;
|
|
1661
|
-
readonly name_localizations?: LocalizationMap;
|
|
1662
|
-
readonly description: string;
|
|
1663
|
-
readonly description_localizations?: LocalizationMap;
|
|
1664
1713
|
readonly options: ToAPIApplicationCommandOptions[];
|
|
1665
|
-
/**
|
|
1666
|
-
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1667
|
-
*
|
|
1668
|
-
* @remarks
|
|
1669
|
-
* If set to `false`, you will have to later `PUT` the permissions for this command.
|
|
1670
|
-
* @param value - Whether or not to enable this command by default
|
|
1671
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1672
|
-
* @deprecated Use {@link SharedSlashCommandSubcommands.setDefaultMemberPermissions} or {@link SharedSlashCommandSubcommands.setDMPermission} instead.
|
|
1673
|
-
*/
|
|
1674
|
-
setDefaultPermission(value: boolean): this;
|
|
1675
|
-
/**
|
|
1676
|
-
* Sets the default permissions a member should have in order to run the command.
|
|
1677
|
-
*
|
|
1678
|
-
* @remarks
|
|
1679
|
-
* You can set this to `'0'` to disable the command by default.
|
|
1680
|
-
* @param permissions - The permissions bit field to set
|
|
1681
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1682
|
-
*/
|
|
1683
|
-
setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
|
|
1684
|
-
/**
|
|
1685
|
-
* Sets if the command is available in direct messages with the application.
|
|
1686
|
-
*
|
|
1687
|
-
* @remarks
|
|
1688
|
-
* By default, commands are visible. This method is only for global commands.
|
|
1689
|
-
* @param enabled - Whether the command should be enabled in direct messages
|
|
1690
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1691
|
-
*/
|
|
1692
|
-
setDMPermission(enabled: boolean | null | undefined): this;
|
|
1693
|
-
/**
|
|
1694
|
-
* Sets whether this command is NSFW.
|
|
1695
|
-
*
|
|
1696
|
-
* @param nsfw - Whether this command is NSFW
|
|
1697
|
-
*/
|
|
1698
|
-
setNSFW(nsfw?: boolean): this;
|
|
1699
1714
|
/**
|
|
1700
1715
|
* Adds a new subcommand group to this command.
|
|
1701
1716
|
*
|
|
@@ -1708,14 +1723,6 @@ declare class SharedSlashCommandSubcommands<TypeAfterAddingSubcommands extends S
|
|
|
1708
1723
|
* @param input - A function that returns a subcommand builder or an already built builder
|
|
1709
1724
|
*/
|
|
1710
1725
|
addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): TypeAfterAddingSubcommands;
|
|
1711
|
-
/**
|
|
1712
|
-
* Serializes this builder to API-compatible JSON data.
|
|
1713
|
-
*
|
|
1714
|
-
* @remarks
|
|
1715
|
-
* This method runs validations on the data before serializing it.
|
|
1716
|
-
* As such, it may throw an error if the data is invalid.
|
|
1717
|
-
*/
|
|
1718
|
-
toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
|
|
1719
1726
|
}
|
|
1720
1727
|
|
|
1721
1728
|
/**
|
|
@@ -1745,7 +1752,7 @@ declare class SlashCommandBuilder {
|
|
|
1745
1752
|
/**
|
|
1746
1753
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
1747
1754
|
*
|
|
1748
|
-
* @deprecated Use {@link
|
|
1755
|
+
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1749
1756
|
*/
|
|
1750
1757
|
readonly default_permission: boolean | undefined;
|
|
1751
1758
|
/**
|
|
@@ -1764,17 +1771,17 @@ declare class SlashCommandBuilder {
|
|
|
1764
1771
|
*/
|
|
1765
1772
|
readonly nsfw: boolean | undefined;
|
|
1766
1773
|
}
|
|
1767
|
-
interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder
|
|
1774
|
+
interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder>, SharedSlashCommand {
|
|
1768
1775
|
}
|
|
1769
1776
|
/**
|
|
1770
1777
|
* An interface specifically for slash command subcommands.
|
|
1771
1778
|
*/
|
|
1772
|
-
interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder
|
|
1779
|
+
interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder>, SharedSlashCommand {
|
|
1773
1780
|
}
|
|
1774
1781
|
/**
|
|
1775
1782
|
* An interface specifically for slash command options.
|
|
1776
1783
|
*/
|
|
1777
|
-
interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>,
|
|
1784
|
+
interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>, SharedSlashCommand {
|
|
1778
1785
|
}
|
|
1779
1786
|
/**
|
|
1780
1787
|
* An interface that ensures the `toJSON()` call will return something
|
|
@@ -1961,4 +1968,4 @@ declare function isValidationEnabled(): boolean;
|
|
|
1961
1968
|
*/
|
|
1962
1969
|
declare const version: string;
|
|
1963
1970
|
|
|
1964
|
-
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
|
|
1971
|
+
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sapphire_shapeshift from '@sapphire/shapeshift';
|
|
2
|
-
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, Snowflake, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption,
|
|
2
|
+
import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, Snowflake, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
|
|
3
3
|
export * from '@discordjs/formatters';
|
|
4
4
|
import { JSONEncodable, Equatable } from '@discordjs/util';
|
|
5
5
|
|
|
@@ -928,7 +928,7 @@ declare class TextInputBuilder extends ComponentBuilder<APITextInputComponent> i
|
|
|
928
928
|
*/
|
|
929
929
|
toJSON(): APITextInputComponent;
|
|
930
930
|
/**
|
|
931
|
-
*
|
|
931
|
+
* Whether this is equal to another structure.
|
|
932
932
|
*/
|
|
933
933
|
equals(other: APITextInputComponent | JSONEncodable<APITextInputComponent>): boolean;
|
|
934
934
|
}
|
|
@@ -1208,6 +1208,59 @@ declare class SharedNameAndDescription {
|
|
|
1208
1208
|
setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this;
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
|
+
/**
|
|
1212
|
+
* This mixin holds symbols that can be shared in slashcommands independent of options or subcommands.
|
|
1213
|
+
*/
|
|
1214
|
+
declare class SharedSlashCommand {
|
|
1215
|
+
readonly name: string;
|
|
1216
|
+
readonly name_localizations?: LocalizationMap;
|
|
1217
|
+
readonly description: string;
|
|
1218
|
+
readonly description_localizations?: LocalizationMap;
|
|
1219
|
+
readonly options: ToAPIApplicationCommandOptions[];
|
|
1220
|
+
/**
|
|
1221
|
+
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1222
|
+
*
|
|
1223
|
+
* @remarks
|
|
1224
|
+
* If set to `false`, you will have to later `PUT` the permissions for this command.
|
|
1225
|
+
* @param value - Whether or not to enable this command by default
|
|
1226
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1227
|
+
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1228
|
+
*/
|
|
1229
|
+
setDefaultPermission(value: boolean): this;
|
|
1230
|
+
/**
|
|
1231
|
+
* Sets the default permissions a member should have in order to run the command.
|
|
1232
|
+
*
|
|
1233
|
+
* @remarks
|
|
1234
|
+
* You can set this to `'0'` to disable the command by default.
|
|
1235
|
+
* @param permissions - The permissions bit field to set
|
|
1236
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1237
|
+
*/
|
|
1238
|
+
setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
|
|
1239
|
+
/**
|
|
1240
|
+
* Sets if the command is available in direct messages with the application.
|
|
1241
|
+
*
|
|
1242
|
+
* @remarks
|
|
1243
|
+
* By default, commands are visible. This method is only for global commands.
|
|
1244
|
+
* @param enabled - Whether the command should be enabled in direct messages
|
|
1245
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1246
|
+
*/
|
|
1247
|
+
setDMPermission(enabled: boolean | null | undefined): this;
|
|
1248
|
+
/**
|
|
1249
|
+
* Sets whether this command is NSFW.
|
|
1250
|
+
*
|
|
1251
|
+
* @param nsfw - Whether this command is NSFW
|
|
1252
|
+
*/
|
|
1253
|
+
setNSFW(nsfw?: boolean): this;
|
|
1254
|
+
/**
|
|
1255
|
+
* Serializes this builder to API-compatible JSON data.
|
|
1256
|
+
*
|
|
1257
|
+
* @remarks
|
|
1258
|
+
* This method runs validations on the data before serializing it.
|
|
1259
|
+
* As such, it may throw an error if the data is invalid.
|
|
1260
|
+
*/
|
|
1261
|
+
toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1211
1264
|
/**
|
|
1212
1265
|
* The base application command option builder that contains common symbols for application command builders.
|
|
1213
1266
|
*/
|
|
@@ -1657,45 +1710,7 @@ interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, Shared
|
|
|
1657
1710
|
* @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group.
|
|
1658
1711
|
*/
|
|
1659
1712
|
declare class SharedSlashCommandSubcommands<TypeAfterAddingSubcommands extends SharedSlashCommandSubcommands<TypeAfterAddingSubcommands>> {
|
|
1660
|
-
readonly name: string;
|
|
1661
|
-
readonly name_localizations?: LocalizationMap;
|
|
1662
|
-
readonly description: string;
|
|
1663
|
-
readonly description_localizations?: LocalizationMap;
|
|
1664
1713
|
readonly options: ToAPIApplicationCommandOptions[];
|
|
1665
|
-
/**
|
|
1666
|
-
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1667
|
-
*
|
|
1668
|
-
* @remarks
|
|
1669
|
-
* If set to `false`, you will have to later `PUT` the permissions for this command.
|
|
1670
|
-
* @param value - Whether or not to enable this command by default
|
|
1671
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1672
|
-
* @deprecated Use {@link SharedSlashCommandSubcommands.setDefaultMemberPermissions} or {@link SharedSlashCommandSubcommands.setDMPermission} instead.
|
|
1673
|
-
*/
|
|
1674
|
-
setDefaultPermission(value: boolean): this;
|
|
1675
|
-
/**
|
|
1676
|
-
* Sets the default permissions a member should have in order to run the command.
|
|
1677
|
-
*
|
|
1678
|
-
* @remarks
|
|
1679
|
-
* You can set this to `'0'` to disable the command by default.
|
|
1680
|
-
* @param permissions - The permissions bit field to set
|
|
1681
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1682
|
-
*/
|
|
1683
|
-
setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
|
|
1684
|
-
/**
|
|
1685
|
-
* Sets if the command is available in direct messages with the application.
|
|
1686
|
-
*
|
|
1687
|
-
* @remarks
|
|
1688
|
-
* By default, commands are visible. This method is only for global commands.
|
|
1689
|
-
* @param enabled - Whether the command should be enabled in direct messages
|
|
1690
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1691
|
-
*/
|
|
1692
|
-
setDMPermission(enabled: boolean | null | undefined): this;
|
|
1693
|
-
/**
|
|
1694
|
-
* Sets whether this command is NSFW.
|
|
1695
|
-
*
|
|
1696
|
-
* @param nsfw - Whether this command is NSFW
|
|
1697
|
-
*/
|
|
1698
|
-
setNSFW(nsfw?: boolean): this;
|
|
1699
1714
|
/**
|
|
1700
1715
|
* Adds a new subcommand group to this command.
|
|
1701
1716
|
*
|
|
@@ -1708,14 +1723,6 @@ declare class SharedSlashCommandSubcommands<TypeAfterAddingSubcommands extends S
|
|
|
1708
1723
|
* @param input - A function that returns a subcommand builder or an already built builder
|
|
1709
1724
|
*/
|
|
1710
1725
|
addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): TypeAfterAddingSubcommands;
|
|
1711
|
-
/**
|
|
1712
|
-
* Serializes this builder to API-compatible JSON data.
|
|
1713
|
-
*
|
|
1714
|
-
* @remarks
|
|
1715
|
-
* This method runs validations on the data before serializing it.
|
|
1716
|
-
* As such, it may throw an error if the data is invalid.
|
|
1717
|
-
*/
|
|
1718
|
-
toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
|
|
1719
1726
|
}
|
|
1720
1727
|
|
|
1721
1728
|
/**
|
|
@@ -1745,7 +1752,7 @@ declare class SlashCommandBuilder {
|
|
|
1745
1752
|
/**
|
|
1746
1753
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
1747
1754
|
*
|
|
1748
|
-
* @deprecated Use {@link
|
|
1755
|
+
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1749
1756
|
*/
|
|
1750
1757
|
readonly default_permission: boolean | undefined;
|
|
1751
1758
|
/**
|
|
@@ -1764,17 +1771,17 @@ declare class SlashCommandBuilder {
|
|
|
1764
1771
|
*/
|
|
1765
1772
|
readonly nsfw: boolean | undefined;
|
|
1766
1773
|
}
|
|
1767
|
-
interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder
|
|
1774
|
+
interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder>, SharedSlashCommand {
|
|
1768
1775
|
}
|
|
1769
1776
|
/**
|
|
1770
1777
|
* An interface specifically for slash command subcommands.
|
|
1771
1778
|
*/
|
|
1772
|
-
interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder
|
|
1779
|
+
interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands<SlashCommandSubcommandsOnlyBuilder>, SharedSlashCommand {
|
|
1773
1780
|
}
|
|
1774
1781
|
/**
|
|
1775
1782
|
* An interface specifically for slash command options.
|
|
1776
1783
|
*/
|
|
1777
|
-
interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>,
|
|
1784
|
+
interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions<SlashCommandOptionsOnlyBuilder>, SharedSlashCommand {
|
|
1778
1785
|
}
|
|
1779
1786
|
/**
|
|
1780
1787
|
* An interface that ensures the `toJSON()` call will return something
|
|
@@ -1961,4 +1968,4 @@ declare function isValidationEnabled(): boolean;
|
|
|
1961
1968
|
*/
|
|
1962
1969
|
declare const version: string;
|
|
1963
1970
|
|
|
1964
|
-
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
|
|
1971
|
+
export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
|
package/dist/index.js
CHANGED
|
@@ -63,6 +63,7 @@ __export(src_exports, {
|
|
|
63
63
|
SelectMenuBuilder: () => StringSelectMenuBuilder,
|
|
64
64
|
SelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
|
|
65
65
|
SharedNameAndDescription: () => SharedNameAndDescription,
|
|
66
|
+
SharedSlashCommand: () => SharedSlashCommand,
|
|
66
67
|
SharedSlashCommandOptions: () => SharedSlashCommandOptions,
|
|
67
68
|
SharedSlashCommandSubcommands: () => SharedSlashCommandSubcommands,
|
|
68
69
|
SlashCommandAssertions: () => Assertions_exports5,
|
|
@@ -1350,7 +1351,7 @@ var TextInputBuilder = class extends ComponentBuilder {
|
|
|
1350
1351
|
};
|
|
1351
1352
|
}
|
|
1352
1353
|
/**
|
|
1353
|
-
*
|
|
1354
|
+
* Whether this is equal to another structure.
|
|
1354
1355
|
*/
|
|
1355
1356
|
equals(other) {
|
|
1356
1357
|
if ((0, import_util.isJSONEncodable)(other)) {
|
|
@@ -1759,6 +1760,84 @@ var SharedNameAndDescription = class {
|
|
|
1759
1760
|
}
|
|
1760
1761
|
};
|
|
1761
1762
|
|
|
1763
|
+
// src/interactions/slashCommands/mixins/SharedSlashCommand.ts
|
|
1764
|
+
var SharedSlashCommand = class {
|
|
1765
|
+
static {
|
|
1766
|
+
__name(this, "SharedSlashCommand");
|
|
1767
|
+
}
|
|
1768
|
+
name = void 0;
|
|
1769
|
+
name_localizations;
|
|
1770
|
+
description = void 0;
|
|
1771
|
+
description_localizations;
|
|
1772
|
+
options = [];
|
|
1773
|
+
/**
|
|
1774
|
+
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1775
|
+
*
|
|
1776
|
+
* @remarks
|
|
1777
|
+
* If set to `false`, you will have to later `PUT` the permissions for this command.
|
|
1778
|
+
* @param value - Whether or not to enable this command by default
|
|
1779
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1780
|
+
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1781
|
+
*/
|
|
1782
|
+
setDefaultPermission(value) {
|
|
1783
|
+
validateDefaultPermission(value);
|
|
1784
|
+
Reflect.set(this, "default_permission", value);
|
|
1785
|
+
return this;
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Sets the default permissions a member should have in order to run the command.
|
|
1789
|
+
*
|
|
1790
|
+
* @remarks
|
|
1791
|
+
* You can set this to `'0'` to disable the command by default.
|
|
1792
|
+
* @param permissions - The permissions bit field to set
|
|
1793
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1794
|
+
*/
|
|
1795
|
+
setDefaultMemberPermissions(permissions) {
|
|
1796
|
+
const permissionValue = validateDefaultMemberPermissions(permissions);
|
|
1797
|
+
Reflect.set(this, "default_member_permissions", permissionValue);
|
|
1798
|
+
return this;
|
|
1799
|
+
}
|
|
1800
|
+
/**
|
|
1801
|
+
* Sets if the command is available in direct messages with the application.
|
|
1802
|
+
*
|
|
1803
|
+
* @remarks
|
|
1804
|
+
* By default, commands are visible. This method is only for global commands.
|
|
1805
|
+
* @param enabled - Whether the command should be enabled in direct messages
|
|
1806
|
+
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
1807
|
+
*/
|
|
1808
|
+
setDMPermission(enabled) {
|
|
1809
|
+
validateDMPermission(enabled);
|
|
1810
|
+
Reflect.set(this, "dm_permission", enabled);
|
|
1811
|
+
return this;
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Sets whether this command is NSFW.
|
|
1815
|
+
*
|
|
1816
|
+
* @param nsfw - Whether this command is NSFW
|
|
1817
|
+
*/
|
|
1818
|
+
setNSFW(nsfw = true) {
|
|
1819
|
+
validateNSFW(nsfw);
|
|
1820
|
+
Reflect.set(this, "nsfw", nsfw);
|
|
1821
|
+
return this;
|
|
1822
|
+
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Serializes this builder to API-compatible JSON data.
|
|
1825
|
+
*
|
|
1826
|
+
* @remarks
|
|
1827
|
+
* This method runs validations on the data before serializing it.
|
|
1828
|
+
* As such, it may throw an error if the data is invalid.
|
|
1829
|
+
*/
|
|
1830
|
+
toJSON() {
|
|
1831
|
+
validateRequiredParameters3(this.name, this.description, this.options);
|
|
1832
|
+
validateLocalizationMap(this.name_localizations);
|
|
1833
|
+
validateLocalizationMap(this.description_localizations);
|
|
1834
|
+
return {
|
|
1835
|
+
...this,
|
|
1836
|
+
options: this.options.map((option) => option.toJSON())
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
};
|
|
1840
|
+
|
|
1762
1841
|
// src/interactions/slashCommands/options/attachment.ts
|
|
1763
1842
|
var import_v1013 = require("discord-api-types/v10");
|
|
1764
1843
|
|
|
@@ -2400,61 +2479,7 @@ var SharedSlashCommandSubcommands = class {
|
|
|
2400
2479
|
static {
|
|
2401
2480
|
__name(this, "SharedSlashCommandSubcommands");
|
|
2402
2481
|
}
|
|
2403
|
-
name = void 0;
|
|
2404
|
-
name_localizations;
|
|
2405
|
-
description = void 0;
|
|
2406
|
-
description_localizations;
|
|
2407
2482
|
options = [];
|
|
2408
|
-
/**
|
|
2409
|
-
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
2410
|
-
*
|
|
2411
|
-
* @remarks
|
|
2412
|
-
* If set to `false`, you will have to later `PUT` the permissions for this command.
|
|
2413
|
-
* @param value - Whether or not to enable this command by default
|
|
2414
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
2415
|
-
* @deprecated Use {@link SharedSlashCommandSubcommands.setDefaultMemberPermissions} or {@link SharedSlashCommandSubcommands.setDMPermission} instead.
|
|
2416
|
-
*/
|
|
2417
|
-
setDefaultPermission(value) {
|
|
2418
|
-
validateDefaultPermission(value);
|
|
2419
|
-
Reflect.set(this, "default_permission", value);
|
|
2420
|
-
return this;
|
|
2421
|
-
}
|
|
2422
|
-
/**
|
|
2423
|
-
* Sets the default permissions a member should have in order to run the command.
|
|
2424
|
-
*
|
|
2425
|
-
* @remarks
|
|
2426
|
-
* You can set this to `'0'` to disable the command by default.
|
|
2427
|
-
* @param permissions - The permissions bit field to set
|
|
2428
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
2429
|
-
*/
|
|
2430
|
-
setDefaultMemberPermissions(permissions) {
|
|
2431
|
-
const permissionValue = validateDefaultMemberPermissions(permissions);
|
|
2432
|
-
Reflect.set(this, "default_member_permissions", permissionValue);
|
|
2433
|
-
return this;
|
|
2434
|
-
}
|
|
2435
|
-
/**
|
|
2436
|
-
* Sets if the command is available in direct messages with the application.
|
|
2437
|
-
*
|
|
2438
|
-
* @remarks
|
|
2439
|
-
* By default, commands are visible. This method is only for global commands.
|
|
2440
|
-
* @param enabled - Whether the command should be enabled in direct messages
|
|
2441
|
-
* @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
|
|
2442
|
-
*/
|
|
2443
|
-
setDMPermission(enabled) {
|
|
2444
|
-
validateDMPermission(enabled);
|
|
2445
|
-
Reflect.set(this, "dm_permission", enabled);
|
|
2446
|
-
return this;
|
|
2447
|
-
}
|
|
2448
|
-
/**
|
|
2449
|
-
* Sets whether this command is NSFW.
|
|
2450
|
-
*
|
|
2451
|
-
* @param nsfw - Whether this command is NSFW
|
|
2452
|
-
*/
|
|
2453
|
-
setNSFW(nsfw = true) {
|
|
2454
|
-
validateNSFW(nsfw);
|
|
2455
|
-
Reflect.set(this, "nsfw", nsfw);
|
|
2456
|
-
return this;
|
|
2457
|
-
}
|
|
2458
2483
|
/**
|
|
2459
2484
|
* Adds a new subcommand group to this command.
|
|
2460
2485
|
*
|
|
@@ -2481,22 +2506,6 @@ var SharedSlashCommandSubcommands = class {
|
|
|
2481
2506
|
options.push(result);
|
|
2482
2507
|
return this;
|
|
2483
2508
|
}
|
|
2484
|
-
/**
|
|
2485
|
-
* Serializes this builder to API-compatible JSON data.
|
|
2486
|
-
*
|
|
2487
|
-
* @remarks
|
|
2488
|
-
* This method runs validations on the data before serializing it.
|
|
2489
|
-
* As such, it may throw an error if the data is invalid.
|
|
2490
|
-
*/
|
|
2491
|
-
toJSON() {
|
|
2492
|
-
validateRequiredParameters3(this.name, this.description, this.options);
|
|
2493
|
-
validateLocalizationMap(this.name_localizations);
|
|
2494
|
-
validateLocalizationMap(this.description_localizations);
|
|
2495
|
-
return {
|
|
2496
|
-
...this,
|
|
2497
|
-
options: this.options.map((option) => option.toJSON())
|
|
2498
|
-
};
|
|
2499
|
-
}
|
|
2500
2509
|
};
|
|
2501
2510
|
|
|
2502
2511
|
// src/interactions/slashCommands/SlashCommandBuilder.ts
|
|
@@ -2524,7 +2533,7 @@ var SlashCommandBuilder = class {
|
|
|
2524
2533
|
/**
|
|
2525
2534
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
2526
2535
|
*
|
|
2527
|
-
* @deprecated Use {@link
|
|
2536
|
+
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
2528
2537
|
*/
|
|
2529
2538
|
default_permission = void 0;
|
|
2530
2539
|
/**
|
|
@@ -2545,7 +2554,7 @@ var SlashCommandBuilder = class {
|
|
|
2545
2554
|
};
|
|
2546
2555
|
__name(SlashCommandBuilder, "SlashCommandBuilder");
|
|
2547
2556
|
SlashCommandBuilder = __decorateClass([
|
|
2548
|
-
(0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands)
|
|
2557
|
+
(0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand)
|
|
2549
2558
|
], SlashCommandBuilder);
|
|
2550
2559
|
|
|
2551
2560
|
// src/interactions/contextMenuCommands/Assertions.ts
|
|
@@ -2744,7 +2753,7 @@ function embedLength(data) {
|
|
|
2744
2753
|
__name(embedLength, "embedLength");
|
|
2745
2754
|
|
|
2746
2755
|
// src/index.ts
|
|
2747
|
-
var version = "1.8.
|
|
2756
|
+
var version = "1.8.1-dev.1714910616-07c12101e";
|
|
2748
2757
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2749
2758
|
0 && (module.exports = {
|
|
2750
2759
|
ActionRowBuilder,
|
|
@@ -2769,6 +2778,7 @@ var version = "1.8.0";
|
|
|
2769
2778
|
SelectMenuBuilder,
|
|
2770
2779
|
SelectMenuOptionBuilder,
|
|
2771
2780
|
SharedNameAndDescription,
|
|
2781
|
+
SharedSlashCommand,
|
|
2772
2782
|
SharedSlashCommandOptions,
|
|
2773
2783
|
SharedSlashCommandSubcommands,
|
|
2774
2784
|
SlashCommandAssertions,
|