@discordjs/builders 1.9.0-dev.1721151665-efa16a609 → 1.9.0-dev.1721607096-b2970bb2d
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.js +41 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1785,6 +1785,7 @@ var SharedNameAndDescription = class {
|
|
|
1785
1785
|
};
|
|
1786
1786
|
|
|
1787
1787
|
// src/interactions/slashCommands/mixins/SharedSlashCommand.ts
|
|
1788
|
+
var import_v1013 = require("discord-api-types/v10");
|
|
1788
1789
|
var SharedSlashCommand = class {
|
|
1789
1790
|
static {
|
|
1790
1791
|
__name(this, "SharedSlashCommand");
|
|
@@ -1884,13 +1885,14 @@ var SharedSlashCommand = class {
|
|
|
1884
1885
|
validateLocalizationMap(this.description_localizations);
|
|
1885
1886
|
return {
|
|
1886
1887
|
...this,
|
|
1888
|
+
type: import_v1013.ApplicationCommandType.ChatInput,
|
|
1887
1889
|
options: this.options.map((option) => option.toJSON())
|
|
1888
1890
|
};
|
|
1889
1891
|
}
|
|
1890
1892
|
};
|
|
1891
1893
|
|
|
1892
1894
|
// src/interactions/slashCommands/options/attachment.ts
|
|
1893
|
-
var
|
|
1895
|
+
var import_v1014 = require("discord-api-types/v10");
|
|
1894
1896
|
|
|
1895
1897
|
// src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
|
|
1896
1898
|
var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
|
|
@@ -1932,7 +1934,7 @@ var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
|
|
|
1932
1934
|
/**
|
|
1933
1935
|
* The type of this option.
|
|
1934
1936
|
*/
|
|
1935
|
-
type =
|
|
1937
|
+
type = import_v1014.ApplicationCommandOptionType.Attachment;
|
|
1936
1938
|
/**
|
|
1937
1939
|
* {@inheritDoc ApplicationCommandOptionBase.toJSON}
|
|
1938
1940
|
*/
|
|
@@ -1943,7 +1945,7 @@ var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
|
|
|
1943
1945
|
};
|
|
1944
1946
|
|
|
1945
1947
|
// src/interactions/slashCommands/options/boolean.ts
|
|
1946
|
-
var
|
|
1948
|
+
var import_v1015 = require("discord-api-types/v10");
|
|
1947
1949
|
var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
|
|
1948
1950
|
static {
|
|
1949
1951
|
__name(this, "SlashCommandBooleanOption");
|
|
@@ -1951,7 +1953,7 @@ var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
|
|
|
1951
1953
|
/**
|
|
1952
1954
|
* The type of this option.
|
|
1953
1955
|
*/
|
|
1954
|
-
type =
|
|
1956
|
+
type = import_v1015.ApplicationCommandOptionType.Boolean;
|
|
1955
1957
|
/**
|
|
1956
1958
|
* {@inheritDoc ApplicationCommandOptionBase.toJSON}
|
|
1957
1959
|
*/
|
|
@@ -1962,23 +1964,23 @@ var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
|
|
|
1962
1964
|
};
|
|
1963
1965
|
|
|
1964
1966
|
// src/interactions/slashCommands/options/channel.ts
|
|
1965
|
-
var
|
|
1967
|
+
var import_v1017 = require("discord-api-types/v10");
|
|
1966
1968
|
var import_ts_mixer = require("ts-mixer");
|
|
1967
1969
|
|
|
1968
1970
|
// src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
|
|
1969
1971
|
var import_shapeshift6 = require("@sapphire/shapeshift");
|
|
1970
|
-
var
|
|
1972
|
+
var import_v1016 = require("discord-api-types/v10");
|
|
1971
1973
|
var allowedChannelTypes = [
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1974
|
+
import_v1016.ChannelType.GuildText,
|
|
1975
|
+
import_v1016.ChannelType.GuildVoice,
|
|
1976
|
+
import_v1016.ChannelType.GuildCategory,
|
|
1977
|
+
import_v1016.ChannelType.GuildAnnouncement,
|
|
1978
|
+
import_v1016.ChannelType.AnnouncementThread,
|
|
1979
|
+
import_v1016.ChannelType.PublicThread,
|
|
1980
|
+
import_v1016.ChannelType.PrivateThread,
|
|
1981
|
+
import_v1016.ChannelType.GuildStageVoice,
|
|
1982
|
+
import_v1016.ChannelType.GuildForum,
|
|
1983
|
+
import_v1016.ChannelType.GuildMedia
|
|
1982
1984
|
];
|
|
1983
1985
|
var channelTypesPredicate = import_shapeshift6.s.array(import_shapeshift6.s.union(...allowedChannelTypes.map((type) => import_shapeshift6.s.literal(type))));
|
|
1984
1986
|
var ApplicationCommandOptionChannelTypesMixin = class {
|
|
@@ -2008,7 +2010,7 @@ var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
|
|
|
2008
2010
|
/**
|
|
2009
2011
|
* The type of this option.
|
|
2010
2012
|
*/
|
|
2011
|
-
type =
|
|
2013
|
+
type = import_v1017.ApplicationCommandOptionType.Channel;
|
|
2012
2014
|
/**
|
|
2013
2015
|
* {@inheritDoc ApplicationCommandOptionBase.toJSON}
|
|
2014
2016
|
*/
|
|
@@ -2024,7 +2026,7 @@ SlashCommandChannelOption = __decorateClass([
|
|
|
2024
2026
|
|
|
2025
2027
|
// src/interactions/slashCommands/options/integer.ts
|
|
2026
2028
|
var import_shapeshift9 = require("@sapphire/shapeshift");
|
|
2027
|
-
var
|
|
2029
|
+
var import_v1019 = require("discord-api-types/v10");
|
|
2028
2030
|
var import_ts_mixer2 = require("ts-mixer");
|
|
2029
2031
|
|
|
2030
2032
|
// src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
|
|
@@ -2076,7 +2078,7 @@ var ApplicationCommandOptionWithAutocompleteMixin = class {
|
|
|
2076
2078
|
|
|
2077
2079
|
// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts
|
|
2078
2080
|
var import_shapeshift8 = require("@sapphire/shapeshift");
|
|
2079
|
-
var
|
|
2081
|
+
var import_v1018 = require("discord-api-types/v10");
|
|
2080
2082
|
var stringPredicate = import_shapeshift8.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);
|
|
2081
2083
|
var numberPredicate = import_shapeshift8.s.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);
|
|
2082
2084
|
var choicesPredicate = import_shapeshift8.s.object({
|
|
@@ -2114,7 +2116,7 @@ var ApplicationCommandOptionWithChoicesMixin = class {
|
|
|
2114
2116
|
}
|
|
2115
2117
|
validateChoicesLength(normalizedChoices.length, this.choices);
|
|
2116
2118
|
for (const { name, name_localizations, value } of normalizedChoices) {
|
|
2117
|
-
if (this.type ===
|
|
2119
|
+
if (this.type === import_v1018.ApplicationCommandOptionType.String) {
|
|
2118
2120
|
stringPredicate.parse(value);
|
|
2119
2121
|
} else {
|
|
2120
2122
|
numberPredicate.parse(value);
|
|
@@ -2146,7 +2148,7 @@ var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
|
|
|
2146
2148
|
/**
|
|
2147
2149
|
* The type of this option.
|
|
2148
2150
|
*/
|
|
2149
|
-
type =
|
|
2151
|
+
type = import_v1019.ApplicationCommandOptionType.Integer;
|
|
2150
2152
|
/**
|
|
2151
2153
|
* {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
|
|
2152
2154
|
*/
|
|
@@ -2184,7 +2186,7 @@ SlashCommandIntegerOption = __decorateClass([
|
|
|
2184
2186
|
], SlashCommandIntegerOption);
|
|
2185
2187
|
|
|
2186
2188
|
// src/interactions/slashCommands/options/mentionable.ts
|
|
2187
|
-
var
|
|
2189
|
+
var import_v1020 = require("discord-api-types/v10");
|
|
2188
2190
|
var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
|
|
2189
2191
|
static {
|
|
2190
2192
|
__name(this, "SlashCommandMentionableOption");
|
|
@@ -2192,7 +2194,7 @@ var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
|
|
|
2192
2194
|
/**
|
|
2193
2195
|
* The type of this option.
|
|
2194
2196
|
*/
|
|
2195
|
-
type =
|
|
2197
|
+
type = import_v1020.ApplicationCommandOptionType.Mentionable;
|
|
2196
2198
|
/**
|
|
2197
2199
|
* {@inheritDoc ApplicationCommandOptionBase.toJSON}
|
|
2198
2200
|
*/
|
|
@@ -2204,14 +2206,14 @@ var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
|
|
|
2204
2206
|
|
|
2205
2207
|
// src/interactions/slashCommands/options/number.ts
|
|
2206
2208
|
var import_shapeshift10 = require("@sapphire/shapeshift");
|
|
2207
|
-
var
|
|
2209
|
+
var import_v1021 = require("discord-api-types/v10");
|
|
2208
2210
|
var import_ts_mixer3 = require("ts-mixer");
|
|
2209
2211
|
var numberValidator2 = import_shapeshift10.s.number;
|
|
2210
2212
|
var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
|
|
2211
2213
|
/**
|
|
2212
2214
|
* The type of this option.
|
|
2213
2215
|
*/
|
|
2214
|
-
type =
|
|
2216
|
+
type = import_v1021.ApplicationCommandOptionType.Number;
|
|
2215
2217
|
/**
|
|
2216
2218
|
* {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
|
|
2217
2219
|
*/
|
|
@@ -2249,7 +2251,7 @@ SlashCommandNumberOption = __decorateClass([
|
|
|
2249
2251
|
], SlashCommandNumberOption);
|
|
2250
2252
|
|
|
2251
2253
|
// src/interactions/slashCommands/options/role.ts
|
|
2252
|
-
var
|
|
2254
|
+
var import_v1022 = require("discord-api-types/v10");
|
|
2253
2255
|
var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
|
|
2254
2256
|
static {
|
|
2255
2257
|
__name(this, "SlashCommandRoleOption");
|
|
@@ -2257,7 +2259,7 @@ var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
|
|
|
2257
2259
|
/**
|
|
2258
2260
|
* The type of this option.
|
|
2259
2261
|
*/
|
|
2260
|
-
type =
|
|
2262
|
+
type = import_v1022.ApplicationCommandOptionType.Role;
|
|
2261
2263
|
/**
|
|
2262
2264
|
* {@inheritDoc ApplicationCommandOptionBase.toJSON}
|
|
2263
2265
|
*/
|
|
@@ -2269,7 +2271,7 @@ var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
|
|
|
2269
2271
|
|
|
2270
2272
|
// src/interactions/slashCommands/options/string.ts
|
|
2271
2273
|
var import_shapeshift11 = require("@sapphire/shapeshift");
|
|
2272
|
-
var
|
|
2274
|
+
var import_v1023 = require("discord-api-types/v10");
|
|
2273
2275
|
var import_ts_mixer4 = require("ts-mixer");
|
|
2274
2276
|
var minLengthValidator2 = import_shapeshift11.s.number.greaterThanOrEqual(0).lessThanOrEqual(6e3);
|
|
2275
2277
|
var maxLengthValidator2 = import_shapeshift11.s.number.greaterThanOrEqual(1).lessThanOrEqual(6e3);
|
|
@@ -2277,7 +2279,7 @@ var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
|
|
|
2277
2279
|
/**
|
|
2278
2280
|
* The type of this option.
|
|
2279
2281
|
*/
|
|
2280
|
-
type =
|
|
2282
|
+
type = import_v1023.ApplicationCommandOptionType.String;
|
|
2281
2283
|
/**
|
|
2282
2284
|
* The maximum length of this option.
|
|
2283
2285
|
*/
|
|
@@ -2323,7 +2325,7 @@ SlashCommandStringOption = __decorateClass([
|
|
|
2323
2325
|
], SlashCommandStringOption);
|
|
2324
2326
|
|
|
2325
2327
|
// src/interactions/slashCommands/options/user.ts
|
|
2326
|
-
var
|
|
2328
|
+
var import_v1024 = require("discord-api-types/v10");
|
|
2327
2329
|
var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
|
|
2328
2330
|
static {
|
|
2329
2331
|
__name(this, "SlashCommandUserOption");
|
|
@@ -2331,7 +2333,7 @@ var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
|
|
|
2331
2333
|
/**
|
|
2332
2334
|
* The type of this option.
|
|
2333
2335
|
*/
|
|
2334
|
-
type =
|
|
2336
|
+
type = import_v1024.ApplicationCommandOptionType.User;
|
|
2335
2337
|
/**
|
|
2336
2338
|
* {@inheritDoc ApplicationCommandOptionBase.toJSON}
|
|
2337
2339
|
*/
|
|
@@ -2437,7 +2439,7 @@ var SharedSlashCommandOptions = class {
|
|
|
2437
2439
|
};
|
|
2438
2440
|
|
|
2439
2441
|
// src/interactions/slashCommands/SlashCommandSubcommands.ts
|
|
2440
|
-
var
|
|
2442
|
+
var import_v1025 = require("discord-api-types/v10");
|
|
2441
2443
|
var import_ts_mixer5 = require("ts-mixer");
|
|
2442
2444
|
var SlashCommandSubcommandGroupBuilder = class {
|
|
2443
2445
|
/**
|
|
@@ -2475,7 +2477,7 @@ var SlashCommandSubcommandGroupBuilder = class {
|
|
|
2475
2477
|
toJSON() {
|
|
2476
2478
|
validateRequiredParameters3(this.name, this.description, this.options);
|
|
2477
2479
|
return {
|
|
2478
|
-
type:
|
|
2480
|
+
type: import_v1025.ApplicationCommandOptionType.SubcommandGroup,
|
|
2479
2481
|
name: this.name,
|
|
2480
2482
|
name_localizations: this.name_localizations,
|
|
2481
2483
|
description: this.description,
|
|
@@ -2511,7 +2513,7 @@ var SlashCommandSubcommandBuilder = class {
|
|
|
2511
2513
|
toJSON() {
|
|
2512
2514
|
validateRequiredParameters3(this.name, this.description, this.options);
|
|
2513
2515
|
return {
|
|
2514
|
-
type:
|
|
2516
|
+
type: import_v1025.ApplicationCommandOptionType.Subcommand,
|
|
2515
2517
|
name: this.name,
|
|
2516
2518
|
name_localizations: this.name_localizations,
|
|
2517
2519
|
description: this.description,
|
|
@@ -2629,9 +2631,9 @@ __export(Assertions_exports6, {
|
|
|
2629
2631
|
validateType: () => validateType
|
|
2630
2632
|
});
|
|
2631
2633
|
var import_shapeshift12 = require("@sapphire/shapeshift");
|
|
2632
|
-
var
|
|
2634
|
+
var import_v1026 = require("discord-api-types/v10");
|
|
2633
2635
|
var namePredicate2 = import_shapeshift12.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled);
|
|
2634
|
-
var typePredicate = import_shapeshift12.s.union(import_shapeshift12.s.literal(
|
|
2636
|
+
var typePredicate = import_shapeshift12.s.union(import_shapeshift12.s.literal(import_v1026.ApplicationCommandType.User), import_shapeshift12.s.literal(import_v1026.ApplicationCommandType.Message)).setValidationEnabled(isValidationEnabled);
|
|
2635
2637
|
var booleanPredicate3 = import_shapeshift12.s.boolean;
|
|
2636
2638
|
function validateDefaultPermission2(value) {
|
|
2637
2639
|
booleanPredicate3.parse(value);
|
|
@@ -2665,10 +2667,10 @@ function validateDefaultMemberPermissions2(permissions) {
|
|
|
2665
2667
|
}
|
|
2666
2668
|
__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
|
|
2667
2669
|
var contextsPredicate2 = import_shapeshift12.s.array(
|
|
2668
|
-
import_shapeshift12.s.nativeEnum(
|
|
2670
|
+
import_shapeshift12.s.nativeEnum(import_v1026.InteractionContextType).setValidationEnabled(isValidationEnabled)
|
|
2669
2671
|
);
|
|
2670
2672
|
var integrationTypesPredicate2 = import_shapeshift12.s.array(
|
|
2671
|
-
import_shapeshift12.s.nativeEnum(
|
|
2673
|
+
import_shapeshift12.s.nativeEnum(import_v1026.ApplicationIntegrationType).setValidationEnabled(isValidationEnabled)
|
|
2672
2674
|
);
|
|
2673
2675
|
|
|
2674
2676
|
// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts
|
|
@@ -2846,7 +2848,7 @@ function embedLength(data) {
|
|
|
2846
2848
|
__name(embedLength, "embedLength");
|
|
2847
2849
|
|
|
2848
2850
|
// src/index.ts
|
|
2849
|
-
var version = "1.9.0-dev.
|
|
2851
|
+
var version = "1.9.0-dev.1721607096-b2970bb2d";
|
|
2850
2852
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2851
2853
|
0 && (module.exports = {
|
|
2852
2854
|
ActionRowBuilder,
|