@discordjs/builders 0.13.0-dev.1649505810-3c0bbac → 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--)
@@ -93,7 +86,6 @@ __export(src_exports, {
93
86
  isEquatable: () => isEquatable,
94
87
  isJSONEncodable: () => isJSONEncodable,
95
88
  italic: () => italic,
96
- memberNicknameMention: () => memberNicknameMention,
97
89
  quote: () => quote,
98
90
  roleMention: () => roleMention,
99
91
  spoiler: () => spoiler,
@@ -102,6 +94,7 @@ __export(src_exports, {
102
94
  underscore: () => underscore,
103
95
  userMention: () => userMention
104
96
  });
97
+ module.exports = __toCommonJS(src_exports);
105
98
 
106
99
  // src/messages/embed/Assertions.ts
107
100
  var Assertions_exports = {};
@@ -335,10 +328,6 @@ function userMention(userId) {
335
328
  return `<@${userId}>`;
336
329
  }
337
330
  __name(userMention, "userMention");
338
- function memberNicknameMention(memberId) {
339
- return `<@!${memberId}>`;
340
- }
341
- __name(memberNicknameMention, "memberNicknameMention");
342
331
  function channelMention(channelId) {
343
332
  return `<#${channelId}>`;
344
333
  }
@@ -395,8 +384,8 @@ __export(Assertions_exports2, {
395
384
  validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
396
385
  validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
397
386
  });
398
- var import_v10 = require("discord-api-types/v10");
399
387
  var import_shapeshift2 = require("@sapphire/shapeshift");
388
+ var import_v10 = require("discord-api-types/v10");
400
389
 
401
390
  // src/components/selectMenu/UnsafeSelectMenuOption.ts
402
391
  var UnsafeSelectMenuOptionBuilder = class {
@@ -520,10 +509,7 @@ __name(createComponentBuilder, "createComponentBuilder");
520
509
 
521
510
  // src/components/ActionRow.ts
522
511
  var ActionRowBuilder = class extends ComponentBuilder {
523
- constructor({
524
- components,
525
- ...data
526
- } = {}) {
512
+ constructor({ components, ...data } = {}) {
527
513
  super({ type: import_v103.ComponentType.ActionRow, ...data });
528
514
  __publicField(this, "components");
529
515
  this.components = components?.map((c) => createComponentBuilder(c)) ?? [];
@@ -622,8 +608,8 @@ __export(Assertions_exports3, {
622
608
  validateRequiredParameters: () => validateRequiredParameters,
623
609
  valueValidator: () => valueValidator
624
610
  });
625
- var import_v105 = require("discord-api-types/v10");
626
611
  var import_shapeshift3 = require("@sapphire/shapeshift");
612
+ var import_v105 = require("discord-api-types/v10");
627
613
  var textInputStyleValidator = import_shapeshift3.s.nativeEnum(import_v105.TextInputStyle);
628
614
  var minLengthValidator = import_shapeshift3.s.number.int.ge(0).le(4e3);
629
615
  var maxLengthValidator = import_shapeshift3.s.number.int.ge(1).le(4e3);
@@ -885,24 +871,31 @@ __export(Assertions_exports5, {
885
871
  validateChoicesLength: () => validateChoicesLength,
886
872
  validateDefaultPermission: () => validateDefaultPermission,
887
873
  validateDescription: () => validateDescription,
874
+ validateLocale: () => validateLocale,
888
875
  validateMaxOptionsLength: () => validateMaxOptionsLength,
889
876
  validateName: () => validateName,
890
877
  validateRequired: () => validateRequired,
891
878
  validateRequiredParameters: () => validateRequiredParameters3
892
879
  });
893
- var import_is = __toESM(require("@sindresorhus/is"));
894
880
  var import_shapeshift5 = require("@sapphire/shapeshift");
895
- var namePredicate = import_shapeshift5.s.string.lengthGe(1).lengthLe(32).regex(/^[\P{Lu}\p{N}_-]+$/u);
881
+ var import_is = __toESM(require("@sindresorhus/is"));
882
+ var import_v108 = require("discord-api-types/v10");
883
+ var namePredicate = import_shapeshift5.s.string.lengthGe(1).lengthLe(32).regex(/^[\P{Lu}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
896
884
  function validateName(name) {
897
885
  namePredicate.parse(name);
898
886
  }
899
887
  __name(validateName, "validateName");
900
888
  var descriptionPredicate2 = import_shapeshift5.s.string.lengthGe(1).lengthLe(100);
889
+ var localePredicate = import_shapeshift5.s.nativeEnum(import_v108.Locale);
901
890
  function validateDescription(description) {
902
891
  descriptionPredicate2.parse(description);
903
892
  }
904
893
  __name(validateDescription, "validateDescription");
905
894
  var maxArrayLengthPredicate = import_shapeshift5.s.unknown.array.lengthLe(25);
895
+ function validateLocale(locale) {
896
+ return localePredicate.parse(locale);
897
+ }
898
+ __name(validateLocale, "validateLocale");
906
899
  function validateMaxOptionsLength(options) {
907
900
  maxArrayLengthPredicate.parse(options);
908
901
  }
@@ -948,14 +941,17 @@ __name(assertReturnOfBuilder, "assertReturnOfBuilder");
948
941
  // src/interactions/slashCommands/SlashCommandBuilder.ts
949
942
  var import_ts_mixer6 = require("ts-mixer");
950
943
 
951
- // src/interactions/slashCommands/options/boolean.ts
952
- 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");
953
947
 
954
948
  // src/interactions/slashCommands/mixins/NameAndDescription.ts
955
949
  var SharedNameAndDescription = class {
956
950
  constructor() {
957
951
  __publicField(this, "name");
952
+ __publicField(this, "name_localizations");
958
953
  __publicField(this, "description");
954
+ __publicField(this, "description_localizations");
959
955
  }
960
956
  setName(name) {
961
957
  validateName(name);
@@ -967,9 +963,54 @@ var SharedNameAndDescription = class {
967
963
  Reflect.set(this, "description", description);
968
964
  return this;
969
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
+ }
970
1008
  };
971
1009
  __name(SharedNameAndDescription, "SharedNameAndDescription");
972
1010
 
1011
+ // src/interactions/slashCommands/options/attachment.ts
1012
+ var import_v109 = require("discord-api-types/v10");
1013
+
973
1014
  // src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
974
1015
  var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
975
1016
  constructor() {
@@ -988,11 +1029,25 @@ var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
988
1029
  };
989
1030
  __name(ApplicationCommandOptionBase, "ApplicationCommandOptionBase");
990
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
+
991
1045
  // src/interactions/slashCommands/options/boolean.ts
1046
+ var import_v1010 = require("discord-api-types/v10");
992
1047
  var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
993
1048
  constructor() {
994
1049
  super(...arguments);
995
- __publicField(this, "type", import_v108.ApplicationCommandOptionType.Boolean);
1050
+ __publicField(this, "type", import_v1010.ApplicationCommandOptionType.Boolean);
996
1051
  }
997
1052
  toJSON() {
998
1053
  this.runRequiredValidations();
@@ -1002,21 +1057,21 @@ var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
1002
1057
  __name(SlashCommandBooleanOption, "SlashCommandBooleanOption");
1003
1058
 
1004
1059
  // src/interactions/slashCommands/options/channel.ts
1005
- var import_v1010 = require("discord-api-types/v10");
1060
+ var import_v1012 = require("discord-api-types/v10");
1006
1061
  var import_ts_mixer = require("ts-mixer");
1007
1062
 
1008
1063
  // src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
1009
- var import_v109 = require("discord-api-types/v10");
1010
1064
  var import_shapeshift6 = require("@sapphire/shapeshift");
1065
+ var import_v1011 = require("discord-api-types/v10");
1011
1066
  var allowedChannelTypes = [
1012
- import_v109.ChannelType.GuildText,
1013
- import_v109.ChannelType.GuildVoice,
1014
- import_v109.ChannelType.GuildCategory,
1015
- import_v109.ChannelType.GuildNews,
1016
- import_v109.ChannelType.GuildNewsThread,
1017
- import_v109.ChannelType.GuildPublicThread,
1018
- import_v109.ChannelType.GuildPrivateThread,
1019
- 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
1020
1075
  ];
1021
1076
  var channelTypesPredicate = import_shapeshift6.s.array(import_shapeshift6.s.union(...allowedChannelTypes.map((type) => import_shapeshift6.s.literal(type))));
1022
1077
  var ApplicationCommandOptionChannelTypesMixin = class {
@@ -1037,7 +1092,7 @@ __name(ApplicationCommandOptionChannelTypesMixin, "ApplicationCommandOptionChann
1037
1092
  var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
1038
1093
  constructor() {
1039
1094
  super(...arguments);
1040
- __publicField(this, "type", import_v1010.ApplicationCommandOptionType.Channel);
1095
+ __publicField(this, "type", import_v1012.ApplicationCommandOptionType.Channel);
1041
1096
  }
1042
1097
  toJSON() {
1043
1098
  this.runRequiredValidations();
@@ -1050,9 +1105,9 @@ SlashCommandChannelOption = __decorateClass([
1050
1105
  ], SlashCommandChannelOption);
1051
1106
 
1052
1107
  // src/interactions/slashCommands/options/integer.ts
1053
- var import_v1012 = require("discord-api-types/v10");
1054
- var import_ts_mixer2 = require("ts-mixer");
1055
1108
  var import_shapeshift8 = require("@sapphire/shapeshift");
1109
+ var import_v1014 = require("discord-api-types/v10");
1110
+ var import_ts_mixer2 = require("ts-mixer");
1056
1111
 
1057
1112
  // src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
1058
1113
  var ApplicationCommandNumericOptionMinMaxValueMixin = class {
@@ -1064,8 +1119,8 @@ var ApplicationCommandNumericOptionMinMaxValueMixin = class {
1064
1119
  __name(ApplicationCommandNumericOptionMinMaxValueMixin, "ApplicationCommandNumericOptionMinMaxValueMixin");
1065
1120
 
1066
1121
  // src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesAndAutocompleteMixin.ts
1067
- var import_v1011 = require("discord-api-types/v10");
1068
1122
  var import_shapeshift7 = require("@sapphire/shapeshift");
1123
+ var import_v1013 = require("discord-api-types/v10");
1069
1124
  var stringPredicate = import_shapeshift7.s.string.lengthGe(1).lengthLe(100);
1070
1125
  var numberPredicate = import_shapeshift7.s.number.gt(-Infinity).lt(Infinity);
1071
1126
  var choicesPredicate = import_shapeshift7.s.object({ name: stringPredicate, value: import_shapeshift7.s.union(stringPredicate, numberPredicate) }).array;
@@ -1086,7 +1141,7 @@ var ApplicationCommandOptionWithChoicesAndAutocompleteMixin = class {
1086
1141
  }
1087
1142
  validateChoicesLength(choices.length, this.choices);
1088
1143
  for (const { name, value } of choices) {
1089
- if (this.type === import_v1011.ApplicationCommandOptionType.String) {
1144
+ if (this.type === import_v1013.ApplicationCommandOptionType.String) {
1090
1145
  stringPredicate.parse(value);
1091
1146
  } else {
1092
1147
  numberPredicate.parse(value);
@@ -1120,7 +1175,7 @@ var numberValidator = import_shapeshift8.s.number.int;
1120
1175
  var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
1121
1176
  constructor() {
1122
1177
  super(...arguments);
1123
- __publicField(this, "type", import_v1012.ApplicationCommandOptionType.Integer);
1178
+ __publicField(this, "type", import_v1014.ApplicationCommandOptionType.Integer);
1124
1179
  }
1125
1180
  setMaxValue(max) {
1126
1181
  numberValidator.parse(max);
@@ -1146,11 +1201,11 @@ SlashCommandIntegerOption = __decorateClass([
1146
1201
  ], SlashCommandIntegerOption);
1147
1202
 
1148
1203
  // src/interactions/slashCommands/options/mentionable.ts
1149
- var import_v1013 = require("discord-api-types/v10");
1204
+ var import_v1015 = require("discord-api-types/v10");
1150
1205
  var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
1151
1206
  constructor() {
1152
1207
  super(...arguments);
1153
- __publicField(this, "type", import_v1013.ApplicationCommandOptionType.Mentionable);
1208
+ __publicField(this, "type", import_v1015.ApplicationCommandOptionType.Mentionable);
1154
1209
  }
1155
1210
  toJSON() {
1156
1211
  this.runRequiredValidations();
@@ -1160,14 +1215,14 @@ var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
1160
1215
  __name(SlashCommandMentionableOption, "SlashCommandMentionableOption");
1161
1216
 
1162
1217
  // src/interactions/slashCommands/options/number.ts
1163
- var import_v1014 = require("discord-api-types/v10");
1164
- var import_ts_mixer3 = require("ts-mixer");
1165
1218
  var import_shapeshift9 = require("@sapphire/shapeshift");
1219
+ var import_v1016 = require("discord-api-types/v10");
1220
+ var import_ts_mixer3 = require("ts-mixer");
1166
1221
  var numberValidator2 = import_shapeshift9.s.number;
1167
1222
  var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
1168
1223
  constructor() {
1169
1224
  super(...arguments);
1170
- __publicField(this, "type", import_v1014.ApplicationCommandOptionType.Number);
1225
+ __publicField(this, "type", import_v1016.ApplicationCommandOptionType.Number);
1171
1226
  }
1172
1227
  setMaxValue(max) {
1173
1228
  numberValidator2.parse(max);
@@ -1193,11 +1248,11 @@ SlashCommandNumberOption = __decorateClass([
1193
1248
  ], SlashCommandNumberOption);
1194
1249
 
1195
1250
  // src/interactions/slashCommands/options/role.ts
1196
- var import_v1015 = require("discord-api-types/v10");
1251
+ var import_v1017 = require("discord-api-types/v10");
1197
1252
  var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
1198
1253
  constructor() {
1199
1254
  super(...arguments);
1200
- __publicField(this, "type", import_v1015.ApplicationCommandOptionType.Role);
1255
+ __publicField(this, "type", import_v1017.ApplicationCommandOptionType.Role);
1201
1256
  }
1202
1257
  toJSON() {
1203
1258
  this.runRequiredValidations();
@@ -1206,27 +1261,13 @@ var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
1206
1261
  };
1207
1262
  __name(SlashCommandRoleOption, "SlashCommandRoleOption");
1208
1263
 
1209
- // src/interactions/slashCommands/options/attachment.ts
1210
- var import_v1016 = require("discord-api-types/v10");
1211
- var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
1212
- constructor() {
1213
- super(...arguments);
1214
- __publicField(this, "type", import_v1016.ApplicationCommandOptionType.Attachment);
1215
- }
1216
- toJSON() {
1217
- this.runRequiredValidations();
1218
- return { ...this };
1219
- }
1220
- };
1221
- __name(SlashCommandAttachmentOption, "SlashCommandAttachmentOption");
1222
-
1223
1264
  // src/interactions/slashCommands/options/string.ts
1224
- var import_v1017 = require("discord-api-types/v10");
1265
+ var import_v1018 = require("discord-api-types/v10");
1225
1266
  var import_ts_mixer4 = require("ts-mixer");
1226
1267
  var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
1227
1268
  constructor() {
1228
1269
  super(...arguments);
1229
- __publicField(this, "type", import_v1017.ApplicationCommandOptionType.String);
1270
+ __publicField(this, "type", import_v1018.ApplicationCommandOptionType.String);
1230
1271
  }
1231
1272
  toJSON() {
1232
1273
  this.runRequiredValidations();
@@ -1242,11 +1283,11 @@ SlashCommandStringOption = __decorateClass([
1242
1283
  ], SlashCommandStringOption);
1243
1284
 
1244
1285
  // src/interactions/slashCommands/options/user.ts
1245
- var import_v1018 = require("discord-api-types/v10");
1286
+ var import_v1019 = require("discord-api-types/v10");
1246
1287
  var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
1247
1288
  constructor() {
1248
1289
  super(...arguments);
1249
- __publicField(this, "type", import_v1018.ApplicationCommandOptionType.User);
1290
+ __publicField(this, "type", import_v1019.ApplicationCommandOptionType.User);
1250
1291
  }
1251
1292
  toJSON() {
1252
1293
  this.runRequiredValidations();
@@ -1299,8 +1340,6 @@ var SharedSlashCommandOptions = class {
1299
1340
  __name(SharedSlashCommandOptions, "SharedSlashCommandOptions");
1300
1341
 
1301
1342
  // src/interactions/slashCommands/SlashCommandSubcommands.ts
1302
- var import_v1019 = require("discord-api-types/v10");
1303
- var import_ts_mixer5 = require("ts-mixer");
1304
1343
  var SlashCommandSubcommandGroupBuilder = class {
1305
1344
  constructor() {
1306
1345
  __publicField(this, "name");
@@ -1318,7 +1357,7 @@ var SlashCommandSubcommandGroupBuilder = class {
1318
1357
  toJSON() {
1319
1358
  validateRequiredParameters3(this.name, this.description, this.options);
1320
1359
  return {
1321
- type: import_v1019.ApplicationCommandOptionType.SubcommandGroup,
1360
+ type: import_v1020.ApplicationCommandOptionType.SubcommandGroup,
1322
1361
  name: this.name,
1323
1362
  description: this.description,
1324
1363
  options: this.options.map((option) => option.toJSON())
@@ -1338,7 +1377,7 @@ var SlashCommandSubcommandBuilder = class {
1338
1377
  toJSON() {
1339
1378
  validateRequiredParameters3(this.name, this.description, this.options);
1340
1379
  return {
1341
- type: import_v1019.ApplicationCommandOptionType.Subcommand,
1380
+ type: import_v1020.ApplicationCommandOptionType.Subcommand,
1342
1381
  name: this.name,
1343
1382
  description: this.description,
1344
1383
  options: this.options.map((option) => option.toJSON())
@@ -1354,7 +1393,9 @@ SlashCommandSubcommandBuilder = __decorateClass([
1354
1393
  var SlashCommandBuilder = class {
1355
1394
  constructor() {
1356
1395
  __publicField(this, "name");
1396
+ __publicField(this, "name_localizations");
1357
1397
  __publicField(this, "description");
1398
+ __publicField(this, "description_localizations");
1358
1399
  __publicField(this, "options", []);
1359
1400
  __publicField(this, "defaultPermission");
1360
1401
  }
@@ -1362,7 +1403,9 @@ var SlashCommandBuilder = class {
1362
1403
  validateRequiredParameters3(this.name, this.description, this.options);
1363
1404
  return {
1364
1405
  name: this.name,
1406
+ name_localizations: this.name_localizations,
1365
1407
  description: this.description,
1408
+ description_localizations: this.description_localizations,
1366
1409
  options: this.options.map((option) => option.toJSON()),
1367
1410
  default_permission: this.defaultPermission
1368
1411
  };
@@ -1403,9 +1446,9 @@ __export(Assertions_exports6, {
1403
1446
  validateType: () => validateType
1404
1447
  });
1405
1448
  var import_shapeshift10 = require("@sapphire/shapeshift");
1406
- var import_v1020 = require("discord-api-types/v10");
1407
- var namePredicate2 = import_shapeshift10.s.string.lengthGe(1).lengthLe(32).regex(/^( *[\p{L}\p{N}_-]+ *)+$/u);
1408
- var typePredicate = import_shapeshift10.s.union(import_shapeshift10.s.literal(import_v1020.ApplicationCommandType.User), import_shapeshift10.s.literal(import_v1020.ApplicationCommandType.Message));
1449
+ var import_v1021 = require("discord-api-types/v10");
1450
+ var namePredicate2 = import_shapeshift10.s.string.lengthGe(1).lengthLe(32).regex(/^( *[\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+ *)+$/u);
1451
+ var typePredicate = import_shapeshift10.s.union(import_shapeshift10.s.literal(import_v1021.ApplicationCommandType.User), import_shapeshift10.s.literal(import_v1021.ApplicationCommandType.Message));
1409
1452
  var booleanPredicate3 = import_shapeshift10.s.boolean;
1410
1453
  function validateDefaultPermission2(value) {
1411
1454
  booleanPredicate3.parse(value);
@@ -1475,7 +1518,6 @@ function embedLength(data) {
1475
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);
1476
1519
  }
1477
1520
  __name(embedLength, "embedLength");
1478
- module.exports = __toCommonJS(src_exports);
1479
1521
  // Annotate the CommonJS export names for ESM import in node:
1480
1522
  0 && (module.exports = {
1481
1523
  ActionRowBuilder,
@@ -1526,7 +1568,6 @@ module.exports = __toCommonJS(src_exports);
1526
1568
  isEquatable,
1527
1569
  isJSONEncodable,
1528
1570
  italic,
1529
- memberNicknameMention,
1530
1571
  quote,
1531
1572
  roleMention,
1532
1573
  spoiler,