@discordjs/builders 1.8.3-dev.1718755836-ba0cb66ff → 1.9.0-dev.1719533408-9c76bbea1
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 +51 -3
- package/dist/index.d.ts +51 -3
- package/dist/index.js +71 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -3
- 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, 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';
|
|
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, InteractionContextType, Permissions, ApplicationIntegrationType, 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
|
|
|
@@ -1217,13 +1217,27 @@ declare class SharedSlashCommand {
|
|
|
1217
1217
|
readonly description: string;
|
|
1218
1218
|
readonly description_localizations?: LocalizationMap;
|
|
1219
1219
|
readonly options: ToAPIApplicationCommandOptions[];
|
|
1220
|
+
readonly contexts?: InteractionContextType[];
|
|
1220
1221
|
/**
|
|
1221
1222
|
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1222
1223
|
*/
|
|
1223
1224
|
readonly default_permission: boolean | undefined;
|
|
1224
1225
|
readonly default_member_permissions: Permissions | null | undefined;
|
|
1225
1226
|
readonly dm_permission: boolean | undefined;
|
|
1227
|
+
readonly integration_types?: ApplicationIntegrationType[];
|
|
1226
1228
|
readonly nsfw: boolean | undefined;
|
|
1229
|
+
/**
|
|
1230
|
+
* Sets the contexts of this command.
|
|
1231
|
+
*
|
|
1232
|
+
* @param contexts - The contexts
|
|
1233
|
+
*/
|
|
1234
|
+
setContexts(...contexts: RestOrArray<InteractionContextType>): this;
|
|
1235
|
+
/**
|
|
1236
|
+
* Sets the integration types of this command.
|
|
1237
|
+
*
|
|
1238
|
+
* @param integrationTypes - The integration types
|
|
1239
|
+
*/
|
|
1240
|
+
setIntegrationTypes(...integrationTypes: RestOrArray<ApplicationIntegrationType>): this;
|
|
1227
1241
|
/**
|
|
1228
1242
|
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1229
1243
|
*
|
|
@@ -1756,6 +1770,10 @@ declare class SlashCommandBuilder {
|
|
|
1756
1770
|
* The options of this command.
|
|
1757
1771
|
*/
|
|
1758
1772
|
readonly options: ToAPIApplicationCommandOptions[];
|
|
1773
|
+
/**
|
|
1774
|
+
* The contexts for this command.
|
|
1775
|
+
*/
|
|
1776
|
+
readonly contexts?: InteractionContextType[];
|
|
1759
1777
|
/**
|
|
1760
1778
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
1761
1779
|
*
|
|
@@ -1773,6 +1791,10 @@ declare class SlashCommandBuilder {
|
|
|
1773
1791
|
* By default, commands are visible. This property is only for global commands.
|
|
1774
1792
|
*/
|
|
1775
1793
|
readonly dm_permission: boolean | undefined;
|
|
1794
|
+
/**
|
|
1795
|
+
* The integration types for this command.
|
|
1796
|
+
*/
|
|
1797
|
+
readonly integration_types?: ApplicationIntegrationType[];
|
|
1776
1798
|
/**
|
|
1777
1799
|
* Whether this command is NSFW.
|
|
1778
1800
|
*/
|
|
@@ -1812,6 +1834,8 @@ declare function validateLocalizationMap(value: unknown): asserts value is Local
|
|
|
1812
1834
|
declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
|
|
1813
1835
|
declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
|
|
1814
1836
|
declare function validateNSFW(value: unknown): asserts value is boolean;
|
|
1837
|
+
declare const contextsPredicate$1: _sapphire_shapeshift.ArrayValidator<InteractionContextType[], InteractionContextType>;
|
|
1838
|
+
declare const integrationTypesPredicate$1: _sapphire_shapeshift.ArrayValidator<ApplicationIntegrationType[], ApplicationIntegrationType>;
|
|
1815
1839
|
|
|
1816
1840
|
declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder;
|
|
1817
1841
|
declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate;
|
|
@@ -1823,7 +1847,7 @@ declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLe
|
|
|
1823
1847
|
declare const Assertions$1_validateNSFW: typeof validateNSFW;
|
|
1824
1848
|
declare const Assertions$1_validateRequired: typeof validateRequired;
|
|
1825
1849
|
declare namespace Assertions$1 {
|
|
1826
|
-
export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters };
|
|
1850
|
+
export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, contextsPredicate$1 as contextsPredicate, integrationTypesPredicate$1 as integrationTypesPredicate, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters };
|
|
1827
1851
|
}
|
|
1828
1852
|
|
|
1829
1853
|
/**
|
|
@@ -1846,6 +1870,10 @@ declare class ContextMenuCommandBuilder {
|
|
|
1846
1870
|
* The type of this command.
|
|
1847
1871
|
*/
|
|
1848
1872
|
readonly type: ContextMenuCommandType;
|
|
1873
|
+
/**
|
|
1874
|
+
* The contexts for this command.
|
|
1875
|
+
*/
|
|
1876
|
+
readonly contexts?: InteractionContextType[];
|
|
1849
1877
|
/**
|
|
1850
1878
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
1851
1879
|
*
|
|
@@ -1863,6 +1891,22 @@ declare class ContextMenuCommandBuilder {
|
|
|
1863
1891
|
* By default, commands are visible. This property is only for global commands.
|
|
1864
1892
|
*/
|
|
1865
1893
|
readonly dm_permission: boolean | undefined;
|
|
1894
|
+
/**
|
|
1895
|
+
* The integration types for this command.
|
|
1896
|
+
*/
|
|
1897
|
+
readonly integration_types?: ApplicationIntegrationType[];
|
|
1898
|
+
/**
|
|
1899
|
+
* Sets the contexts of this command.
|
|
1900
|
+
*
|
|
1901
|
+
* @param contexts - The contexts
|
|
1902
|
+
*/
|
|
1903
|
+
setContexts(...contexts: RestOrArray<InteractionContextType>): this;
|
|
1904
|
+
/**
|
|
1905
|
+
* Sets integration types of this command.
|
|
1906
|
+
*
|
|
1907
|
+
* @param integrationTypes - The integration types
|
|
1908
|
+
*/
|
|
1909
|
+
setIntegrationTypes(...integrationTypes: RestOrArray<ApplicationIntegrationType>): this;
|
|
1866
1910
|
/**
|
|
1867
1911
|
* Sets the name of this command.
|
|
1868
1912
|
*
|
|
@@ -1932,7 +1976,11 @@ declare function validateType(type: unknown): asserts type is ContextMenuCommand
|
|
|
1932
1976
|
declare function validateRequiredParameters(name: string, type: number): void;
|
|
1933
1977
|
declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined;
|
|
1934
1978
|
declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined;
|
|
1979
|
+
declare const contextsPredicate: _sapphire_shapeshift.ArrayValidator<InteractionContextType[], InteractionContextType>;
|
|
1980
|
+
declare const integrationTypesPredicate: _sapphire_shapeshift.ArrayValidator<ApplicationIntegrationType[], ApplicationIntegrationType>;
|
|
1935
1981
|
|
|
1982
|
+
declare const Assertions_contextsPredicate: typeof contextsPredicate;
|
|
1983
|
+
declare const Assertions_integrationTypesPredicate: typeof integrationTypesPredicate;
|
|
1936
1984
|
declare const Assertions_validateDMPermission: typeof validateDMPermission;
|
|
1937
1985
|
declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions;
|
|
1938
1986
|
declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission;
|
|
@@ -1940,7 +1988,7 @@ declare const Assertions_validateName: typeof validateName;
|
|
|
1940
1988
|
declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters;
|
|
1941
1989
|
declare const Assertions_validateType: typeof validateType;
|
|
1942
1990
|
declare namespace Assertions {
|
|
1943
|
-
export { Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType };
|
|
1991
|
+
export { Assertions_contextsPredicate as contextsPredicate, Assertions_integrationTypesPredicate as integrationTypesPredicate, Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType };
|
|
1944
1992
|
}
|
|
1945
1993
|
|
|
1946
1994
|
/**
|
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, 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';
|
|
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, InteractionContextType, Permissions, ApplicationIntegrationType, 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
|
|
|
@@ -1217,13 +1217,27 @@ declare class SharedSlashCommand {
|
|
|
1217
1217
|
readonly description: string;
|
|
1218
1218
|
readonly description_localizations?: LocalizationMap;
|
|
1219
1219
|
readonly options: ToAPIApplicationCommandOptions[];
|
|
1220
|
+
readonly contexts?: InteractionContextType[];
|
|
1220
1221
|
/**
|
|
1221
1222
|
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1222
1223
|
*/
|
|
1223
1224
|
readonly default_permission: boolean | undefined;
|
|
1224
1225
|
readonly default_member_permissions: Permissions | null | undefined;
|
|
1225
1226
|
readonly dm_permission: boolean | undefined;
|
|
1227
|
+
readonly integration_types?: ApplicationIntegrationType[];
|
|
1226
1228
|
readonly nsfw: boolean | undefined;
|
|
1229
|
+
/**
|
|
1230
|
+
* Sets the contexts of this command.
|
|
1231
|
+
*
|
|
1232
|
+
* @param contexts - The contexts
|
|
1233
|
+
*/
|
|
1234
|
+
setContexts(...contexts: RestOrArray<InteractionContextType>): this;
|
|
1235
|
+
/**
|
|
1236
|
+
* Sets the integration types of this command.
|
|
1237
|
+
*
|
|
1238
|
+
* @param integrationTypes - The integration types
|
|
1239
|
+
*/
|
|
1240
|
+
setIntegrationTypes(...integrationTypes: RestOrArray<ApplicationIntegrationType>): this;
|
|
1227
1241
|
/**
|
|
1228
1242
|
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1229
1243
|
*
|
|
@@ -1756,6 +1770,10 @@ declare class SlashCommandBuilder {
|
|
|
1756
1770
|
* The options of this command.
|
|
1757
1771
|
*/
|
|
1758
1772
|
readonly options: ToAPIApplicationCommandOptions[];
|
|
1773
|
+
/**
|
|
1774
|
+
* The contexts for this command.
|
|
1775
|
+
*/
|
|
1776
|
+
readonly contexts?: InteractionContextType[];
|
|
1759
1777
|
/**
|
|
1760
1778
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
1761
1779
|
*
|
|
@@ -1773,6 +1791,10 @@ declare class SlashCommandBuilder {
|
|
|
1773
1791
|
* By default, commands are visible. This property is only for global commands.
|
|
1774
1792
|
*/
|
|
1775
1793
|
readonly dm_permission: boolean | undefined;
|
|
1794
|
+
/**
|
|
1795
|
+
* The integration types for this command.
|
|
1796
|
+
*/
|
|
1797
|
+
readonly integration_types?: ApplicationIntegrationType[];
|
|
1776
1798
|
/**
|
|
1777
1799
|
* Whether this command is NSFW.
|
|
1778
1800
|
*/
|
|
@@ -1812,6 +1834,8 @@ declare function validateLocalizationMap(value: unknown): asserts value is Local
|
|
|
1812
1834
|
declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
|
|
1813
1835
|
declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
|
|
1814
1836
|
declare function validateNSFW(value: unknown): asserts value is boolean;
|
|
1837
|
+
declare const contextsPredicate$1: _sapphire_shapeshift.ArrayValidator<InteractionContextType[], InteractionContextType>;
|
|
1838
|
+
declare const integrationTypesPredicate$1: _sapphire_shapeshift.ArrayValidator<ApplicationIntegrationType[], ApplicationIntegrationType>;
|
|
1815
1839
|
|
|
1816
1840
|
declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder;
|
|
1817
1841
|
declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate;
|
|
@@ -1823,7 +1847,7 @@ declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLe
|
|
|
1823
1847
|
declare const Assertions$1_validateNSFW: typeof validateNSFW;
|
|
1824
1848
|
declare const Assertions$1_validateRequired: typeof validateRequired;
|
|
1825
1849
|
declare namespace Assertions$1 {
|
|
1826
|
-
export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters };
|
|
1850
|
+
export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, contextsPredicate$1 as contextsPredicate, integrationTypesPredicate$1 as integrationTypesPredicate, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters };
|
|
1827
1851
|
}
|
|
1828
1852
|
|
|
1829
1853
|
/**
|
|
@@ -1846,6 +1870,10 @@ declare class ContextMenuCommandBuilder {
|
|
|
1846
1870
|
* The type of this command.
|
|
1847
1871
|
*/
|
|
1848
1872
|
readonly type: ContextMenuCommandType;
|
|
1873
|
+
/**
|
|
1874
|
+
* The contexts for this command.
|
|
1875
|
+
*/
|
|
1876
|
+
readonly contexts?: InteractionContextType[];
|
|
1849
1877
|
/**
|
|
1850
1878
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
1851
1879
|
*
|
|
@@ -1863,6 +1891,22 @@ declare class ContextMenuCommandBuilder {
|
|
|
1863
1891
|
* By default, commands are visible. This property is only for global commands.
|
|
1864
1892
|
*/
|
|
1865
1893
|
readonly dm_permission: boolean | undefined;
|
|
1894
|
+
/**
|
|
1895
|
+
* The integration types for this command.
|
|
1896
|
+
*/
|
|
1897
|
+
readonly integration_types?: ApplicationIntegrationType[];
|
|
1898
|
+
/**
|
|
1899
|
+
* Sets the contexts of this command.
|
|
1900
|
+
*
|
|
1901
|
+
* @param contexts - The contexts
|
|
1902
|
+
*/
|
|
1903
|
+
setContexts(...contexts: RestOrArray<InteractionContextType>): this;
|
|
1904
|
+
/**
|
|
1905
|
+
* Sets integration types of this command.
|
|
1906
|
+
*
|
|
1907
|
+
* @param integrationTypes - The integration types
|
|
1908
|
+
*/
|
|
1909
|
+
setIntegrationTypes(...integrationTypes: RestOrArray<ApplicationIntegrationType>): this;
|
|
1866
1910
|
/**
|
|
1867
1911
|
* Sets the name of this command.
|
|
1868
1912
|
*
|
|
@@ -1932,7 +1976,11 @@ declare function validateType(type: unknown): asserts type is ContextMenuCommand
|
|
|
1932
1976
|
declare function validateRequiredParameters(name: string, type: number): void;
|
|
1933
1977
|
declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined;
|
|
1934
1978
|
declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined;
|
|
1979
|
+
declare const contextsPredicate: _sapphire_shapeshift.ArrayValidator<InteractionContextType[], InteractionContextType>;
|
|
1980
|
+
declare const integrationTypesPredicate: _sapphire_shapeshift.ArrayValidator<ApplicationIntegrationType[], ApplicationIntegrationType>;
|
|
1935
1981
|
|
|
1982
|
+
declare const Assertions_contextsPredicate: typeof contextsPredicate;
|
|
1983
|
+
declare const Assertions_integrationTypesPredicate: typeof integrationTypesPredicate;
|
|
1936
1984
|
declare const Assertions_validateDMPermission: typeof validateDMPermission;
|
|
1937
1985
|
declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions;
|
|
1938
1986
|
declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission;
|
|
@@ -1940,7 +1988,7 @@ declare const Assertions_validateName: typeof validateName;
|
|
|
1940
1988
|
declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters;
|
|
1941
1989
|
declare const Assertions_validateType: typeof validateType;
|
|
1942
1990
|
declare namespace Assertions {
|
|
1943
|
-
export { Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType };
|
|
1991
|
+
export { Assertions_contextsPredicate as contextsPredicate, Assertions_integrationTypesPredicate as integrationTypesPredicate, Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType };
|
|
1944
1992
|
}
|
|
1945
1993
|
|
|
1946
1994
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1553,6 +1553,8 @@ var ModalBuilder = class {
|
|
|
1553
1553
|
var Assertions_exports5 = {};
|
|
1554
1554
|
__export(Assertions_exports5, {
|
|
1555
1555
|
assertReturnOfBuilder: () => assertReturnOfBuilder,
|
|
1556
|
+
contextsPredicate: () => contextsPredicate,
|
|
1557
|
+
integrationTypesPredicate: () => integrationTypesPredicate,
|
|
1556
1558
|
localizationMapPredicate: () => localizationMapPredicate,
|
|
1557
1559
|
validateChoicesLength: () => validateChoicesLength,
|
|
1558
1560
|
validateDMPermission: () => validateDMPermission,
|
|
@@ -1636,6 +1638,12 @@ function validateNSFW(value) {
|
|
|
1636
1638
|
booleanPredicate.parse(value);
|
|
1637
1639
|
}
|
|
1638
1640
|
__name(validateNSFW, "validateNSFW");
|
|
1641
|
+
var contextsPredicate = import_shapeshift5.s.array(
|
|
1642
|
+
import_shapeshift5.s.nativeEnum(import_v1012.InteractionContextType).setValidationEnabled(isValidationEnabled)
|
|
1643
|
+
);
|
|
1644
|
+
var integrationTypesPredicate = import_shapeshift5.s.array(
|
|
1645
|
+
import_shapeshift5.s.nativeEnum(import_v1012.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled)
|
|
1646
|
+
);
|
|
1639
1647
|
|
|
1640
1648
|
// src/interactions/slashCommands/SlashCommandBuilder.ts
|
|
1641
1649
|
var import_ts_mixer6 = require("ts-mixer");
|
|
@@ -1763,13 +1771,33 @@ var SharedSlashCommand = class {
|
|
|
1763
1771
|
description = void 0;
|
|
1764
1772
|
description_localizations;
|
|
1765
1773
|
options = [];
|
|
1774
|
+
contexts;
|
|
1766
1775
|
/**
|
|
1767
1776
|
* @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
|
|
1768
1777
|
*/
|
|
1769
1778
|
default_permission = void 0;
|
|
1770
1779
|
default_member_permissions = void 0;
|
|
1771
1780
|
dm_permission = void 0;
|
|
1781
|
+
integration_types;
|
|
1772
1782
|
nsfw = void 0;
|
|
1783
|
+
/**
|
|
1784
|
+
* Sets the contexts of this command.
|
|
1785
|
+
*
|
|
1786
|
+
* @param contexts - The contexts
|
|
1787
|
+
*/
|
|
1788
|
+
setContexts(...contexts) {
|
|
1789
|
+
Reflect.set(this, "contexts", contextsPredicate.parse(normalizeArray(contexts)));
|
|
1790
|
+
return this;
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Sets the integration types of this command.
|
|
1794
|
+
*
|
|
1795
|
+
* @param integrationTypes - The integration types
|
|
1796
|
+
*/
|
|
1797
|
+
setIntegrationTypes(...integrationTypes) {
|
|
1798
|
+
Reflect.set(this, "integration_types", integrationTypesPredicate.parse(normalizeArray(integrationTypes)));
|
|
1799
|
+
return this;
|
|
1800
|
+
}
|
|
1773
1801
|
/**
|
|
1774
1802
|
* Sets whether the command is enabled by default when the application is added to a guild.
|
|
1775
1803
|
*
|
|
@@ -2530,6 +2558,10 @@ var SlashCommandBuilder = class {
|
|
|
2530
2558
|
* The options of this command.
|
|
2531
2559
|
*/
|
|
2532
2560
|
options = [];
|
|
2561
|
+
/**
|
|
2562
|
+
* The contexts for this command.
|
|
2563
|
+
*/
|
|
2564
|
+
contexts;
|
|
2533
2565
|
/**
|
|
2534
2566
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
2535
2567
|
*
|
|
@@ -2547,6 +2579,10 @@ var SlashCommandBuilder = class {
|
|
|
2547
2579
|
* By default, commands are visible. This property is only for global commands.
|
|
2548
2580
|
*/
|
|
2549
2581
|
dm_permission = void 0;
|
|
2582
|
+
/**
|
|
2583
|
+
* The integration types for this command.
|
|
2584
|
+
*/
|
|
2585
|
+
integration_types;
|
|
2550
2586
|
/**
|
|
2551
2587
|
* Whether this command is NSFW.
|
|
2552
2588
|
*/
|
|
@@ -2560,6 +2596,8 @@ SlashCommandBuilder = __decorateClass([
|
|
|
2560
2596
|
// src/interactions/contextMenuCommands/Assertions.ts
|
|
2561
2597
|
var Assertions_exports6 = {};
|
|
2562
2598
|
__export(Assertions_exports6, {
|
|
2599
|
+
contextsPredicate: () => contextsPredicate2,
|
|
2600
|
+
integrationTypesPredicate: () => integrationTypesPredicate2,
|
|
2563
2601
|
validateDMPermission: () => validateDMPermission2,
|
|
2564
2602
|
validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2,
|
|
2565
2603
|
validateDefaultPermission: () => validateDefaultPermission2,
|
|
@@ -2603,6 +2641,12 @@ function validateDefaultMemberPermissions2(permissions) {
|
|
|
2603
2641
|
return memberPermissionPredicate2.parse(permissions);
|
|
2604
2642
|
}
|
|
2605
2643
|
__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
|
|
2644
|
+
var contextsPredicate2 = import_shapeshift12.s.array(
|
|
2645
|
+
import_shapeshift12.s.nativeEnum(import_v1025.InteractionContextType).setValidationEnabled(isValidationEnabled)
|
|
2646
|
+
);
|
|
2647
|
+
var integrationTypesPredicate2 = import_shapeshift12.s.array(
|
|
2648
|
+
import_shapeshift12.s.nativeEnum(import_v1025.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled)
|
|
2649
|
+
);
|
|
2606
2650
|
|
|
2607
2651
|
// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts
|
|
2608
2652
|
var ContextMenuCommandBuilder = class {
|
|
@@ -2621,6 +2665,10 @@ var ContextMenuCommandBuilder = class {
|
|
|
2621
2665
|
* The type of this command.
|
|
2622
2666
|
*/
|
|
2623
2667
|
type = void 0;
|
|
2668
|
+
/**
|
|
2669
|
+
* The contexts for this command.
|
|
2670
|
+
*/
|
|
2671
|
+
contexts;
|
|
2624
2672
|
/**
|
|
2625
2673
|
* Whether this command is enabled by default when the application is added to a guild.
|
|
2626
2674
|
*
|
|
@@ -2638,6 +2686,28 @@ var ContextMenuCommandBuilder = class {
|
|
|
2638
2686
|
* By default, commands are visible. This property is only for global commands.
|
|
2639
2687
|
*/
|
|
2640
2688
|
dm_permission = void 0;
|
|
2689
|
+
/**
|
|
2690
|
+
* The integration types for this command.
|
|
2691
|
+
*/
|
|
2692
|
+
integration_types;
|
|
2693
|
+
/**
|
|
2694
|
+
* Sets the contexts of this command.
|
|
2695
|
+
*
|
|
2696
|
+
* @param contexts - The contexts
|
|
2697
|
+
*/
|
|
2698
|
+
setContexts(...contexts) {
|
|
2699
|
+
Reflect.set(this, "contexts", contextsPredicate2.parse(normalizeArray(contexts)));
|
|
2700
|
+
return this;
|
|
2701
|
+
}
|
|
2702
|
+
/**
|
|
2703
|
+
* Sets integration types of this command.
|
|
2704
|
+
*
|
|
2705
|
+
* @param integrationTypes - The integration types
|
|
2706
|
+
*/
|
|
2707
|
+
setIntegrationTypes(...integrationTypes) {
|
|
2708
|
+
Reflect.set(this, "integration_types", integrationTypesPredicate2.parse(normalizeArray(integrationTypes)));
|
|
2709
|
+
return this;
|
|
2710
|
+
}
|
|
2641
2711
|
/**
|
|
2642
2712
|
* Sets the name of this command.
|
|
2643
2713
|
*
|
|
@@ -2753,7 +2823,7 @@ function embedLength(data) {
|
|
|
2753
2823
|
__name(embedLength, "embedLength");
|
|
2754
2824
|
|
|
2755
2825
|
// src/index.ts
|
|
2756
|
-
var version = "1.
|
|
2826
|
+
var version = "1.9.0-dev.1719533408-9c76bbea1";
|
|
2757
2827
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2758
2828
|
0 && (module.exports = {
|
|
2759
2829
|
ActionRowBuilder,
|