@discordjs/builders 0.13.0-dev.1649937819-b01f414 → 0.13.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/dist/index.js CHANGED
@@ -6,28 +6,21 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
10
9
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
10
  var __export = (target, all) => {
12
11
  for (var name in all)
13
12
  __defProp(target, name, { get: all[name], enumerable: true });
14
13
  };
15
- var __reExport = (target, module2, copyDefault, desc) => {
16
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
17
- for (let key of __getOwnPropNames(module2))
18
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
19
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
19
  }
21
- return target;
20
+ return to;
22
21
  };
23
- var __toESM = (module2, isNodeMode) => {
24
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
25
- };
26
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
27
- return (module2, temp) => {
28
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
29
- };
30
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
24
  var __decorateClass = (decorators, target, key, kind) => {
32
25
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
33
26
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
@@ -101,6 +94,7 @@ __export(src_exports, {
101
94
  underscore: () => underscore,
102
95
  userMention: () => userMention
103
96
  });
97
+ module.exports = __toCommonJS(src_exports);
104
98
 
105
99
  // src/messages/embed/Assertions.ts
106
100
  var Assertions_exports = {};
@@ -390,8 +384,8 @@ __export(Assertions_exports2, {
390
384
  validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
391
385
  validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
392
386
  });
393
- var import_v10 = require("discord-api-types/v10");
394
387
  var import_shapeshift2 = require("@sapphire/shapeshift");
388
+ var import_v10 = require("discord-api-types/v10");
395
389
 
396
390
  // src/components/selectMenu/UnsafeSelectMenuOption.ts
397
391
  var UnsafeSelectMenuOptionBuilder = class {
@@ -515,10 +509,7 @@ __name(createComponentBuilder, "createComponentBuilder");
515
509
 
516
510
  // src/components/ActionRow.ts
517
511
  var ActionRowBuilder = class extends ComponentBuilder {
518
- constructor({
519
- components,
520
- ...data
521
- } = {}) {
512
+ constructor({ components, ...data } = {}) {
522
513
  super({ type: import_v103.ComponentType.ActionRow, ...data });
523
514
  __publicField(this, "components");
524
515
  this.components = components?.map((c) => createComponentBuilder(c)) ?? [];
@@ -617,8 +608,8 @@ __export(Assertions_exports3, {
617
608
  validateRequiredParameters: () => validateRequiredParameters,
618
609
  valueValidator: () => valueValidator
619
610
  });
620
- var import_v105 = require("discord-api-types/v10");
621
611
  var import_shapeshift3 = require("@sapphire/shapeshift");
612
+ var import_v105 = require("discord-api-types/v10");
622
613
  var textInputStyleValidator = import_shapeshift3.s.nativeEnum(import_v105.TextInputStyle);
623
614
  var minLengthValidator = import_shapeshift3.s.number.int.ge(0).le(4e3);
624
615
  var maxLengthValidator = import_shapeshift3.s.number.int.ge(1).le(4e3);
@@ -880,24 +871,31 @@ __export(Assertions_exports5, {
880
871
  validateChoicesLength: () => validateChoicesLength,
881
872
  validateDefaultPermission: () => validateDefaultPermission,
882
873
  validateDescription: () => validateDescription,
874
+ validateLocale: () => validateLocale,
883
875
  validateMaxOptionsLength: () => validateMaxOptionsLength,
884
876
  validateName: () => validateName,
885
877
  validateRequired: () => validateRequired,
886
878
  validateRequiredParameters: () => validateRequiredParameters3
887
879
  });
888
- var import_is = __toESM(require("@sindresorhus/is"));
889
880
  var import_shapeshift5 = require("@sapphire/shapeshift");
881
+ var import_is = __toESM(require("@sindresorhus/is"));
882
+ var import_v108 = require("discord-api-types/v10");
890
883
  var namePredicate = import_shapeshift5.s.string.lengthGe(1).lengthLe(32).regex(/^[\P{Lu}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
891
884
  function validateName(name) {
892
885
  namePredicate.parse(name);
893
886
  }
894
887
  __name(validateName, "validateName");
895
888
  var descriptionPredicate2 = import_shapeshift5.s.string.lengthGe(1).lengthLe(100);
889
+ var localePredicate = import_shapeshift5.s.nativeEnum(import_v108.Locale);
896
890
  function validateDescription(description) {
897
891
  descriptionPredicate2.parse(description);
898
892
  }
899
893
  __name(validateDescription, "validateDescription");
900
894
  var maxArrayLengthPredicate = import_shapeshift5.s.unknown.array.lengthLe(25);
895
+ function validateLocale(locale) {
896
+ return localePredicate.parse(locale);
897
+ }
898
+ __name(validateLocale, "validateLocale");
901
899
  function validateMaxOptionsLength(options) {
902
900
  maxArrayLengthPredicate.parse(options);
903
901
  }
@@ -943,14 +941,17 @@ __name(assertReturnOfBuilder, "assertReturnOfBuilder");
943
941
  // src/interactions/slashCommands/SlashCommandBuilder.ts
944
942
  var import_ts_mixer6 = require("ts-mixer");
945
943
 
946
- // src/interactions/slashCommands/options/boolean.ts
947
- var import_v108 = require("discord-api-types/v10");
944
+ // src/interactions/slashCommands/SlashCommandSubcommands.ts
945
+ var import_v1020 = require("discord-api-types/v10");
946
+ var import_ts_mixer5 = require("ts-mixer");
948
947
 
949
948
  // src/interactions/slashCommands/mixins/NameAndDescription.ts
950
949
  var SharedNameAndDescription = class {
951
950
  constructor() {
952
951
  __publicField(this, "name");
952
+ __publicField(this, "name_localizations");
953
953
  __publicField(this, "description");
954
+ __publicField(this, "description_localizations");
954
955
  }
955
956
  setName(name) {
956
957
  validateName(name);
@@ -962,9 +963,54 @@ var SharedNameAndDescription = class {
962
963
  Reflect.set(this, "description", description);
963
964
  return this;
964
965
  }
966
+ setNameLocalization(locale, localizedName) {
967
+ if (!this.name_localizations) {
968
+ Reflect.set(this, "name_localizations", {});
969
+ }
970
+ if (localizedName === null) {
971
+ this.name_localizations[locale] = null;
972
+ return this;
973
+ }
974
+ validateName(localizedName);
975
+ this.name_localizations[validateLocale(locale)] = localizedName;
976
+ return this;
977
+ }
978
+ setNameLocalizations(localizedNames) {
979
+ if (localizedNames === null) {
980
+ Reflect.set(this, "name_localizations", null);
981
+ return this;
982
+ }
983
+ Reflect.set(this, "name_localizations", {});
984
+ Object.entries(localizedNames).forEach((args) => this.setNameLocalization(...args));
985
+ return this;
986
+ }
987
+ setDescriptionLocalization(locale, localizedDescription) {
988
+ if (!this.description_localizations) {
989
+ Reflect.set(this, "description_localizations", {});
990
+ }
991
+ if (localizedDescription === null) {
992
+ this.description_localizations[locale] = null;
993
+ return this;
994
+ }
995
+ validateDescription(localizedDescription);
996
+ this.description_localizations[validateLocale(locale)] = localizedDescription;
997
+ return this;
998
+ }
999
+ setDescriptionLocalizations(localizedDescriptions) {
1000
+ if (localizedDescriptions === null) {
1001
+ Reflect.set(this, "description_localizations", null);
1002
+ return this;
1003
+ }
1004
+ Reflect.set(this, "description_localizations", {});
1005
+ Object.entries(localizedDescriptions).forEach((args) => this.setDescriptionLocalization(...args));
1006
+ return this;
1007
+ }
965
1008
  };
966
1009
  __name(SharedNameAndDescription, "SharedNameAndDescription");
967
1010
 
1011
+ // src/interactions/slashCommands/options/attachment.ts
1012
+ var import_v109 = require("discord-api-types/v10");
1013
+
968
1014
  // src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
969
1015
  var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
970
1016
  constructor() {
@@ -983,11 +1029,25 @@ var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
983
1029
  };
984
1030
  __name(ApplicationCommandOptionBase, "ApplicationCommandOptionBase");
985
1031
 
1032
+ // src/interactions/slashCommands/options/attachment.ts
1033
+ var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
1034
+ constructor() {
1035
+ super(...arguments);
1036
+ __publicField(this, "type", import_v109.ApplicationCommandOptionType.Attachment);
1037
+ }
1038
+ toJSON() {
1039
+ this.runRequiredValidations();
1040
+ return { ...this };
1041
+ }
1042
+ };
1043
+ __name(SlashCommandAttachmentOption, "SlashCommandAttachmentOption");
1044
+
986
1045
  // src/interactions/slashCommands/options/boolean.ts
1046
+ var import_v1010 = require("discord-api-types/v10");
987
1047
  var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
988
1048
  constructor() {
989
1049
  super(...arguments);
990
- __publicField(this, "type", import_v108.ApplicationCommandOptionType.Boolean);
1050
+ __publicField(this, "type", import_v1010.ApplicationCommandOptionType.Boolean);
991
1051
  }
992
1052
  toJSON() {
993
1053
  this.runRequiredValidations();
@@ -997,21 +1057,21 @@ var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
997
1057
  __name(SlashCommandBooleanOption, "SlashCommandBooleanOption");
998
1058
 
999
1059
  // src/interactions/slashCommands/options/channel.ts
1000
- var import_v1010 = require("discord-api-types/v10");
1060
+ var import_v1012 = require("discord-api-types/v10");
1001
1061
  var import_ts_mixer = require("ts-mixer");
1002
1062
 
1003
1063
  // src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
1004
- var import_v109 = require("discord-api-types/v10");
1005
1064
  var import_shapeshift6 = require("@sapphire/shapeshift");
1065
+ var import_v1011 = require("discord-api-types/v10");
1006
1066
  var allowedChannelTypes = [
1007
- import_v109.ChannelType.GuildText,
1008
- import_v109.ChannelType.GuildVoice,
1009
- import_v109.ChannelType.GuildCategory,
1010
- import_v109.ChannelType.GuildNews,
1011
- import_v109.ChannelType.GuildNewsThread,
1012
- import_v109.ChannelType.GuildPublicThread,
1013
- import_v109.ChannelType.GuildPrivateThread,
1014
- import_v109.ChannelType.GuildStageVoice
1067
+ import_v1011.ChannelType.GuildText,
1068
+ import_v1011.ChannelType.GuildVoice,
1069
+ import_v1011.ChannelType.GuildCategory,
1070
+ import_v1011.ChannelType.GuildNews,
1071
+ import_v1011.ChannelType.GuildNewsThread,
1072
+ import_v1011.ChannelType.GuildPublicThread,
1073
+ import_v1011.ChannelType.GuildPrivateThread,
1074
+ import_v1011.ChannelType.GuildStageVoice
1015
1075
  ];
1016
1076
  var channelTypesPredicate = import_shapeshift6.s.array(import_shapeshift6.s.union(...allowedChannelTypes.map((type) => import_shapeshift6.s.literal(type))));
1017
1077
  var ApplicationCommandOptionChannelTypesMixin = class {
@@ -1032,7 +1092,7 @@ __name(ApplicationCommandOptionChannelTypesMixin, "ApplicationCommandOptionChann
1032
1092
  var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
1033
1093
  constructor() {
1034
1094
  super(...arguments);
1035
- __publicField(this, "type", import_v1010.ApplicationCommandOptionType.Channel);
1095
+ __publicField(this, "type", import_v1012.ApplicationCommandOptionType.Channel);
1036
1096
  }
1037
1097
  toJSON() {
1038
1098
  this.runRequiredValidations();
@@ -1045,9 +1105,9 @@ SlashCommandChannelOption = __decorateClass([
1045
1105
  ], SlashCommandChannelOption);
1046
1106
 
1047
1107
  // src/interactions/slashCommands/options/integer.ts
1048
- var import_v1012 = require("discord-api-types/v10");
1049
- var import_ts_mixer2 = require("ts-mixer");
1050
1108
  var import_shapeshift8 = require("@sapphire/shapeshift");
1109
+ var import_v1014 = require("discord-api-types/v10");
1110
+ var import_ts_mixer2 = require("ts-mixer");
1051
1111
 
1052
1112
  // src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
1053
1113
  var ApplicationCommandNumericOptionMinMaxValueMixin = class {
@@ -1059,8 +1119,8 @@ var ApplicationCommandNumericOptionMinMaxValueMixin = class {
1059
1119
  __name(ApplicationCommandNumericOptionMinMaxValueMixin, "ApplicationCommandNumericOptionMinMaxValueMixin");
1060
1120
 
1061
1121
  // src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts
1062
- var import_v1011 = require("discord-api-types/v10");
1063
1122
  var import_shapeshift7 = require("@sapphire/shapeshift");
1123
+ var import_v1013 = require("discord-api-types/v10");
1064
1124
  var stringPredicate = import_shapeshift7.s.string.lengthGe(1).lengthLe(100);
1065
1125
  var numberPredicate = import_shapeshift7.s.number.gt(-Infinity).lt(Infinity);
1066
1126
  var choicesPredicate = import_shapeshift7.s.object({ name: stringPredicate, value: import_shapeshift7.s.union(stringPredicate, numberPredicate) }).array;
@@ -1081,7 +1141,7 @@ var ApplicationCommandOptionWithChoicesAndAutocompleteMixin = class {
1081
1141
  }
1082
1142
  validateChoicesLength(choices.length, this.choices);
1083
1143
  for (const { name, value } of choices) {
1084
- if (this.type === import_v1011.ApplicationCommandOptionType.String) {
1144
+ if (this.type === import_v1013.ApplicationCommandOptionType.String) {
1085
1145
  stringPredicate.parse(value);
1086
1146
  } else {
1087
1147
  numberPredicate.parse(value);
@@ -1115,7 +1175,7 @@ var numberValidator = import_shapeshift8.s.number.int;
1115
1175
  var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
1116
1176
  constructor() {
1117
1177
  super(...arguments);
1118
- __publicField(this, "type", import_v1012.ApplicationCommandOptionType.Integer);
1178
+ __publicField(this, "type", import_v1014.ApplicationCommandOptionType.Integer);
1119
1179
  }
1120
1180
  setMaxValue(max) {
1121
1181
  numberValidator.parse(max);
@@ -1141,11 +1201,11 @@ SlashCommandIntegerOption = __decorateClass([
1141
1201
  ], SlashCommandIntegerOption);
1142
1202
 
1143
1203
  // src/interactions/slashCommands/options/mentionable.ts
1144
- var import_v1013 = require("discord-api-types/v10");
1204
+ var import_v1015 = require("discord-api-types/v10");
1145
1205
  var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
1146
1206
  constructor() {
1147
1207
  super(...arguments);
1148
- __publicField(this, "type", import_v1013.ApplicationCommandOptionType.Mentionable);
1208
+ __publicField(this, "type", import_v1015.ApplicationCommandOptionType.Mentionable);
1149
1209
  }
1150
1210
  toJSON() {
1151
1211
  this.runRequiredValidations();
@@ -1155,14 +1215,14 @@ var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
1155
1215
  __name(SlashCommandMentionableOption, "SlashCommandMentionableOption");
1156
1216
 
1157
1217
  // src/interactions/slashCommands/options/number.ts
1158
- var import_v1014 = require("discord-api-types/v10");
1159
- var import_ts_mixer3 = require("ts-mixer");
1160
1218
  var import_shapeshift9 = require("@sapphire/shapeshift");
1219
+ var import_v1016 = require("discord-api-types/v10");
1220
+ var import_ts_mixer3 = require("ts-mixer");
1161
1221
  var numberValidator2 = import_shapeshift9.s.number;
1162
1222
  var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
1163
1223
  constructor() {
1164
1224
  super(...arguments);
1165
- __publicField(this, "type", import_v1014.ApplicationCommandOptionType.Number);
1225
+ __publicField(this, "type", import_v1016.ApplicationCommandOptionType.Number);
1166
1226
  }
1167
1227
  setMaxValue(max) {
1168
1228
  numberValidator2.parse(max);
@@ -1188,11 +1248,11 @@ SlashCommandNumberOption = __decorateClass([
1188
1248
  ], SlashCommandNumberOption);
1189
1249
 
1190
1250
  // src/interactions/slashCommands/options/role.ts
1191
- var import_v1015 = require("discord-api-types/v10");
1251
+ var import_v1017 = require("discord-api-types/v10");
1192
1252
  var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
1193
1253
  constructor() {
1194
1254
  super(...arguments);
1195
- __publicField(this, "type", import_v1015.ApplicationCommandOptionType.Role);
1255
+ __publicField(this, "type", import_v1017.ApplicationCommandOptionType.Role);
1196
1256
  }
1197
1257
  toJSON() {
1198
1258
  this.runRequiredValidations();
@@ -1201,27 +1261,13 @@ var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
1201
1261
  };
1202
1262
  __name(SlashCommandRoleOption, "SlashCommandRoleOption");
1203
1263
 
1204
- // src/interactions/slashCommands/options/attachment.ts
1205
- var import_v1016 = require("discord-api-types/v10");
1206
- var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
1207
- constructor() {
1208
- super(...arguments);
1209
- __publicField(this, "type", import_v1016.ApplicationCommandOptionType.Attachment);
1210
- }
1211
- toJSON() {
1212
- this.runRequiredValidations();
1213
- return { ...this };
1214
- }
1215
- };
1216
- __name(SlashCommandAttachmentOption, "SlashCommandAttachmentOption");
1217
-
1218
1264
  // src/interactions/slashCommands/options/string.ts
1219
- var import_v1017 = require("discord-api-types/v10");
1265
+ var import_v1018 = require("discord-api-types/v10");
1220
1266
  var import_ts_mixer4 = require("ts-mixer");
1221
1267
  var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
1222
1268
  constructor() {
1223
1269
  super(...arguments);
1224
- __publicField(this, "type", import_v1017.ApplicationCommandOptionType.String);
1270
+ __publicField(this, "type", import_v1018.ApplicationCommandOptionType.String);
1225
1271
  }
1226
1272
  toJSON() {
1227
1273
  this.runRequiredValidations();
@@ -1237,11 +1283,11 @@ SlashCommandStringOption = __decorateClass([
1237
1283
  ], SlashCommandStringOption);
1238
1284
 
1239
1285
  // src/interactions/slashCommands/options/user.ts
1240
- var import_v1018 = require("discord-api-types/v10");
1286
+ var import_v1019 = require("discord-api-types/v10");
1241
1287
  var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
1242
1288
  constructor() {
1243
1289
  super(...arguments);
1244
- __publicField(this, "type", import_v1018.ApplicationCommandOptionType.User);
1290
+ __publicField(this, "type", import_v1019.ApplicationCommandOptionType.User);
1245
1291
  }
1246
1292
  toJSON() {
1247
1293
  this.runRequiredValidations();
@@ -1294,8 +1340,6 @@ var SharedSlashCommandOptions = class {
1294
1340
  __name(SharedSlashCommandOptions, "SharedSlashCommandOptions");
1295
1341
 
1296
1342
  // src/interactions/slashCommands/SlashCommandSubcommands.ts
1297
- var import_v1019 = require("discord-api-types/v10");
1298
- var import_ts_mixer5 = require("ts-mixer");
1299
1343
  var SlashCommandSubcommandGroupBuilder = class {
1300
1344
  constructor() {
1301
1345
  __publicField(this, "name");
@@ -1313,7 +1357,7 @@ var SlashCommandSubcommandGroupBuilder = class {
1313
1357
  toJSON() {
1314
1358
  validateRequiredParameters3(this.name, this.description, this.options);
1315
1359
  return {
1316
- type: import_v1019.ApplicationCommandOptionType.SubcommandGroup,
1360
+ type: import_v1020.ApplicationCommandOptionType.SubcommandGroup,
1317
1361
  name: this.name,
1318
1362
  description: this.description,
1319
1363
  options: this.options.map((option) => option.toJSON())
@@ -1333,7 +1377,7 @@ var SlashCommandSubcommandBuilder = class {
1333
1377
  toJSON() {
1334
1378
  validateRequiredParameters3(this.name, this.description, this.options);
1335
1379
  return {
1336
- type: import_v1019.ApplicationCommandOptionType.Subcommand,
1380
+ type: import_v1020.ApplicationCommandOptionType.Subcommand,
1337
1381
  name: this.name,
1338
1382
  description: this.description,
1339
1383
  options: this.options.map((option) => option.toJSON())
@@ -1349,7 +1393,9 @@ SlashCommandSubcommandBuilder = __decorateClass([
1349
1393
  var SlashCommandBuilder = class {
1350
1394
  constructor() {
1351
1395
  __publicField(this, "name");
1396
+ __publicField(this, "name_localizations");
1352
1397
  __publicField(this, "description");
1398
+ __publicField(this, "description_localizations");
1353
1399
  __publicField(this, "options", []);
1354
1400
  __publicField(this, "defaultPermission");
1355
1401
  }
@@ -1357,7 +1403,9 @@ var SlashCommandBuilder = class {
1357
1403
  validateRequiredParameters3(this.name, this.description, this.options);
1358
1404
  return {
1359
1405
  name: this.name,
1406
+ name_localizations: this.name_localizations,
1360
1407
  description: this.description,
1408
+ description_localizations: this.description_localizations,
1361
1409
  options: this.options.map((option) => option.toJSON()),
1362
1410
  default_permission: this.defaultPermission
1363
1411
  };
@@ -1398,9 +1446,9 @@ __export(Assertions_exports6, {
1398
1446
  validateType: () => validateType
1399
1447
  });
1400
1448
  var import_shapeshift10 = require("@sapphire/shapeshift");
1401
- var import_v1020 = require("discord-api-types/v10");
1449
+ var import_v1021 = require("discord-api-types/v10");
1402
1450
  var namePredicate2 = import_shapeshift10.s.string.lengthGe(1).lengthLe(32).regex(/^( *[\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+ *)+$/u);
1403
- var typePredicate = import_shapeshift10.s.union(import_shapeshift10.s.literal(import_v1020.ApplicationCommandType.User), import_shapeshift10.s.literal(import_v1020.ApplicationCommandType.Message));
1451
+ var typePredicate = import_shapeshift10.s.union(import_shapeshift10.s.literal(import_v1021.ApplicationCommandType.User), import_shapeshift10.s.literal(import_v1021.ApplicationCommandType.Message));
1404
1452
  var booleanPredicate3 = import_shapeshift10.s.boolean;
1405
1453
  function validateDefaultPermission2(value) {
1406
1454
  booleanPredicate3.parse(value);
@@ -1470,7 +1518,6 @@ function embedLength(data) {
1470
1518
  return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0);
1471
1519
  }
1472
1520
  __name(embedLength, "embedLength");
1473
- module.exports = __toCommonJS(src_exports);
1474
1521
  // Annotate the CommonJS export names for ESM import in node:
1475
1522
  0 && (module.exports = {
1476
1523
  ActionRowBuilder,