@discordjs/builders 2.0.0-dev.1757073695-ddf9f818e → 2.0.0-dev.1757160090-352c9819b

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
@@ -57,6 +57,7 @@ __export(index_exports, {
57
57
  EmbedFooterBuilder: () => EmbedFooterBuilder,
58
58
  EmojiOrLabelButtonMixin: () => EmojiOrLabelButtonMixin,
59
59
  FileBuilder: () => FileBuilder,
60
+ LabelBuilder: () => LabelBuilder,
60
61
  LinkButtonBuilder: () => LinkButtonBuilder,
61
62
  MediaGalleryBuilder: () => MediaGalleryBuilder,
62
63
  MediaGalleryItemBuilder: () => MediaGalleryItemBuilder,
@@ -112,6 +113,7 @@ __export(index_exports, {
112
113
  filePredicate: () => filePredicate,
113
114
  integerOptionPredicate: () => integerOptionPredicate,
114
115
  isValidationEnabled: () => isValidationEnabled,
116
+ labelPredicate: () => labelPredicate2,
115
117
  localeMapPredicate: () => localeMapPredicate,
116
118
  mediaGalleryItemPredicate: () => mediaGalleryItemPredicate,
117
119
  mediaGalleryPredicate: () => mediaGalleryPredicate,
@@ -511,6 +513,41 @@ var PremiumButtonBuilder = class extends BaseButtonBuilder {
511
513
  }
512
514
  };
513
515
 
516
+ // src/components/label/Label.ts
517
+ var import_v1024 = require("discord-api-types/v10");
518
+
519
+ // src/util/resolveBuilder.ts
520
+ function isBuilder(builder, Constructor) {
521
+ return builder instanceof Constructor;
522
+ }
523
+ __name(isBuilder, "isBuilder");
524
+ function resolveBuilder(builder, Constructor) {
525
+ if (isBuilder(builder, Constructor)) {
526
+ return builder;
527
+ }
528
+ if (typeof builder === "function") {
529
+ return builder(new Constructor());
530
+ }
531
+ return new Constructor(builder);
532
+ }
533
+ __name(resolveBuilder, "resolveBuilder");
534
+
535
+ // src/components/Components.ts
536
+ var import_v1022 = require("discord-api-types/v10");
537
+
538
+ // src/components/ActionRow.ts
539
+ var import_v1013 = require("discord-api-types/v10");
540
+
541
+ // src/util/normalizeArray.ts
542
+ function normalizeArray(arr) {
543
+ if (Array.isArray(arr[0])) return [...arr[0]];
544
+ return arr;
545
+ }
546
+ __name(normalizeArray, "normalizeArray");
547
+
548
+ // src/components/selectMenu/ChannelSelectMenu.ts
549
+ var import_v106 = require("discord-api-types/v10");
550
+
514
551
  // src/components/selectMenu/BaseSelectMenu.ts
515
552
  var BaseSelectMenuBuilder = class extends ComponentBuilder {
516
553
  static {
@@ -570,16 +607,6 @@ var BaseSelectMenuBuilder = class extends ComponentBuilder {
570
607
  }
571
608
  };
572
609
 
573
- // src/components/selectMenu/ChannelSelectMenu.ts
574
- var import_v106 = require("discord-api-types/v10");
575
-
576
- // src/util/normalizeArray.ts
577
- function normalizeArray(arr) {
578
- if (Array.isArray(arr[0])) return [...arr[0]];
579
- return arr;
580
- }
581
- __name(normalizeArray, "normalizeArray");
582
-
583
610
  // src/components/selectMenu/ChannelSelectMenu.ts
584
611
  var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder {
585
612
  static {
@@ -845,22 +872,6 @@ var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder {
845
872
  // src/components/selectMenu/StringSelectMenu.ts
846
873
  var import_v109 = require("discord-api-types/v10");
847
874
 
848
- // src/util/resolveBuilder.ts
849
- function isBuilder(builder, Constructor) {
850
- return builder instanceof Constructor;
851
- }
852
- __name(isBuilder, "isBuilder");
853
- function resolveBuilder(builder, Constructor) {
854
- if (isBuilder(builder, Constructor)) {
855
- return builder;
856
- }
857
- if (typeof builder === "function") {
858
- return builder(new Constructor());
859
- }
860
- return new Constructor(builder);
861
- }
862
- __name(resolveBuilder, "resolveBuilder");
863
-
864
875
  // src/components/selectMenu/StringSelectMenuOption.ts
865
876
  var StringSelectMenuOptionBuilder = class {
866
877
  static {
@@ -1065,6 +1076,16 @@ var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder {
1065
1076
  this.data.options.splice(index, deleteCount, ...resolved);
1066
1077
  return this;
1067
1078
  }
1079
+ /**
1080
+ * Sets whether this string select menu is required.
1081
+ *
1082
+ * @remarks Only for use in modals.
1083
+ * @param required - Whether this string select menu is required
1084
+ */
1085
+ setRequired(required = true) {
1086
+ this.data.required = required;
1087
+ return this;
1088
+ }
1068
1089
  /**
1069
1090
  * {@inheritDoc ComponentBuilder.toJSON}
1070
1091
  */
@@ -1161,7 +1182,6 @@ var import_zod4 = require("zod");
1161
1182
  var textInputPredicate = import_zod4.z.object({
1162
1183
  type: import_zod4.z.literal(import_v1011.ComponentType.TextInput),
1163
1184
  custom_id: customIdPredicate,
1164
- label: import_zod4.z.string().min(1).max(45),
1165
1185
  style: import_zod4.z.enum(import_v1011.TextInputStyle),
1166
1186
  min_length: import_zod4.z.number().min(0).max(4e3).optional(),
1167
1187
  max_length: import_zod4.z.number().min(1).max(4e3).optional(),
@@ -1188,7 +1208,7 @@ var TextInputBuilder = class extends ComponentBuilder {
1188
1208
  * ```ts
1189
1209
  * const textInput = new TextInputBuilder({
1190
1210
  * custom_id: 'a cool text input',
1191
- * label: 'Type something',
1211
+ * placeholder: 'Type something',
1192
1212
  * style: TextInputStyle.Short,
1193
1213
  * });
1194
1214
  * ```
@@ -1196,7 +1216,7 @@ var TextInputBuilder = class extends ComponentBuilder {
1196
1216
  * Creating a text input using setters and API data:
1197
1217
  * ```ts
1198
1218
  * const textInput = new TextInputBuilder({
1199
- * label: 'Type something else',
1219
+ * placeholder: 'Type something else',
1200
1220
  * })
1201
1221
  * .setCustomId('woah')
1202
1222
  * .setStyle(TextInputStyle.Paragraph);
@@ -1215,15 +1235,6 @@ var TextInputBuilder = class extends ComponentBuilder {
1215
1235
  this.data.custom_id = customId;
1216
1236
  return this;
1217
1237
  }
1218
- /**
1219
- * Sets the label for this text input.
1220
- *
1221
- * @param label - The label to use
1222
- */
1223
- setLabel(label) {
1224
- this.data.label = label;
1225
- return this;
1226
- }
1227
1238
  /**
1228
1239
  * Sets the style for this text input.
1229
1240
  *
@@ -1316,17 +1327,241 @@ var TextInputBuilder = class extends ComponentBuilder {
1316
1327
  }
1317
1328
  };
1318
1329
 
1319
- // src/components/ActionRow.ts
1320
- var import_v1022 = require("discord-api-types/v10");
1321
-
1322
- // src/components/Components.ts
1323
- var import_v1021 = require("discord-api-types/v10");
1324
-
1330
+ // src/components/ActionRow.ts
1331
+ var ActionRowBuilder = class extends ComponentBuilder {
1332
+ static {
1333
+ __name(this, "ActionRowBuilder");
1334
+ }
1335
+ /**
1336
+ * @internal
1337
+ */
1338
+ data;
1339
+ /**
1340
+ * The components within this action row.
1341
+ */
1342
+ get components() {
1343
+ return this.data.components;
1344
+ }
1345
+ /**
1346
+ * Creates a new action row.
1347
+ *
1348
+ * @param data - The API data to create this action row with
1349
+ * @example
1350
+ * Creating an action row from an API data object:
1351
+ * ```ts
1352
+ * const actionRow = new ActionRowBuilder({
1353
+ * components: [
1354
+ * {
1355
+ * custom_id: "custom id",
1356
+ * label: "Type something",
1357
+ * style: TextInputStyle.Short,
1358
+ * type: ComponentType.TextInput,
1359
+ * },
1360
+ * ],
1361
+ * });
1362
+ * ```
1363
+ * @example
1364
+ * Creating an action row using setters and API data:
1365
+ * ```ts
1366
+ * const actionRow = new ActionRowBuilder({
1367
+ * components: [
1368
+ * {
1369
+ * custom_id: "custom id",
1370
+ * label: "Click me",
1371
+ * style: ButtonStyle.Primary,
1372
+ * type: ComponentType.Button,
1373
+ * },
1374
+ * ],
1375
+ * })
1376
+ * .addComponents(button2, button3);
1377
+ * ```
1378
+ */
1379
+ constructor(data = {}) {
1380
+ super();
1381
+ const { components = [], ...rest } = data;
1382
+ this.data = {
1383
+ ...structuredClone(rest),
1384
+ components: components.map((component) => createComponentBuilder(component)),
1385
+ type: import_v1013.ComponentType.ActionRow
1386
+ };
1387
+ }
1388
+ /**
1389
+ * Adds primary button components to this action row.
1390
+ *
1391
+ * @param input - The buttons to add
1392
+ */
1393
+ addPrimaryButtonComponents(...input) {
1394
+ const normalized = normalizeArray(input);
1395
+ const resolved = normalized.map((component) => resolveBuilder(component, PrimaryButtonBuilder));
1396
+ this.data.components.push(...resolved);
1397
+ return this;
1398
+ }
1399
+ /**
1400
+ * Adds secondary button components to this action row.
1401
+ *
1402
+ * @param input - The buttons to add
1403
+ */
1404
+ addSecondaryButtonComponents(...input) {
1405
+ const normalized = normalizeArray(input);
1406
+ const resolved = normalized.map((component) => resolveBuilder(component, SecondaryButtonBuilder));
1407
+ this.data.components.push(...resolved);
1408
+ return this;
1409
+ }
1410
+ /**
1411
+ * Adds success button components to this action row.
1412
+ *
1413
+ * @param input - The buttons to add
1414
+ */
1415
+ addSuccessButtonComponents(...input) {
1416
+ const normalized = normalizeArray(input);
1417
+ const resolved = normalized.map((component) => resolveBuilder(component, SuccessButtonBuilder));
1418
+ this.data.components.push(...resolved);
1419
+ return this;
1420
+ }
1421
+ /**
1422
+ * Adds danger button components to this action row.
1423
+ */
1424
+ addDangerButtonComponents(...input) {
1425
+ const normalized = normalizeArray(input);
1426
+ const resolved = normalized.map((component) => resolveBuilder(component, DangerButtonBuilder));
1427
+ this.data.components.push(...resolved);
1428
+ return this;
1429
+ }
1430
+ /**
1431
+ * Generically add any type of component to this action row, only takes in an instance of a component builder.
1432
+ */
1433
+ addComponents(...input) {
1434
+ const normalized = normalizeArray(input);
1435
+ this.data.components.push(...normalized);
1436
+ return this;
1437
+ }
1438
+ /**
1439
+ * Adds SKU id button components to this action row.
1440
+ *
1441
+ * @param input - The buttons to add
1442
+ */
1443
+ addPremiumButtonComponents(...input) {
1444
+ const normalized = normalizeArray(input);
1445
+ const resolved = normalized.map((component) => resolveBuilder(component, PremiumButtonBuilder));
1446
+ this.data.components.push(...resolved);
1447
+ return this;
1448
+ }
1449
+ /**
1450
+ * Adds URL button components to this action row.
1451
+ *
1452
+ * @param input - The buttons to add
1453
+ */
1454
+ addLinkButtonComponents(...input) {
1455
+ const normalized = normalizeArray(input);
1456
+ const resolved = normalized.map((component) => resolveBuilder(component, LinkButtonBuilder));
1457
+ this.data.components.push(...resolved);
1458
+ return this;
1459
+ }
1460
+ /**
1461
+ * Adds a channel select menu component to this action row.
1462
+ *
1463
+ * @param input - A function that returns a component builder or an already built builder
1464
+ */
1465
+ addChannelSelectMenuComponent(input) {
1466
+ this.data.components.push(resolveBuilder(input, ChannelSelectMenuBuilder));
1467
+ return this;
1468
+ }
1469
+ /**
1470
+ * Adds a mentionable select menu component to this action row.
1471
+ *
1472
+ * @param input - A function that returns a component builder or an already built builder
1473
+ */
1474
+ addMentionableSelectMenuComponent(input) {
1475
+ this.data.components.push(resolveBuilder(input, MentionableSelectMenuBuilder));
1476
+ return this;
1477
+ }
1478
+ /**
1479
+ * Adds a role select menu component to this action row.
1480
+ *
1481
+ * @param input - A function that returns a component builder or an already built builder
1482
+ */
1483
+ addRoleSelectMenuComponent(input) {
1484
+ this.data.components.push(resolveBuilder(input, RoleSelectMenuBuilder));
1485
+ return this;
1486
+ }
1487
+ /**
1488
+ * Adds a string select menu component to this action row.
1489
+ *
1490
+ * @param input - A function that returns a component builder or an already built builder
1491
+ */
1492
+ addStringSelectMenuComponent(input) {
1493
+ this.data.components.push(resolveBuilder(input, StringSelectMenuBuilder));
1494
+ return this;
1495
+ }
1496
+ /**
1497
+ * Adds a user select menu component to this action row.
1498
+ *
1499
+ * @param input - A function that returns a component builder or an already built builder
1500
+ */
1501
+ addUserSelectMenuComponent(input) {
1502
+ this.data.components.push(resolveBuilder(input, UserSelectMenuBuilder));
1503
+ return this;
1504
+ }
1505
+ /**
1506
+ * Adds a text input component to this action row.
1507
+ *
1508
+ * @param input - A function that returns a component builder or an already built builder
1509
+ */
1510
+ addTextInputComponent(input) {
1511
+ this.data.components.push(resolveBuilder(input, TextInputBuilder));
1512
+ return this;
1513
+ }
1514
+ /**
1515
+ * Removes, replaces, or inserts components for this action row.
1516
+ *
1517
+ * @remarks
1518
+ * This method behaves similarly
1519
+ * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
1520
+ *
1521
+ * It's useful for modifying and adjusting order of the already-existing components of an action row.
1522
+ * @example
1523
+ * Remove the first component:
1524
+ * ```ts
1525
+ * actionRow.spliceComponents(0, 1);
1526
+ * ```
1527
+ * @example
1528
+ * Remove the first n components:
1529
+ * ```ts
1530
+ * const n = 4;
1531
+ * actionRow.spliceComponents(0, n);
1532
+ * ```
1533
+ * @example
1534
+ * Remove the last component:
1535
+ * ```ts
1536
+ * actionRow.spliceComponents(-1, 1);
1537
+ * ```
1538
+ * @param index - The index to start at
1539
+ * @param deleteCount - The number of components to remove
1540
+ * @param components - The replacing component objects
1541
+ */
1542
+ spliceComponents(index, deleteCount, ...components) {
1543
+ this.data.components.splice(index, deleteCount, ...components);
1544
+ return this;
1545
+ }
1546
+ /**
1547
+ * {@inheritDoc ComponentBuilder.toJSON}
1548
+ */
1549
+ toJSON(validationOverride) {
1550
+ const { components, ...rest } = this.data;
1551
+ const data = {
1552
+ ...structuredClone(rest),
1553
+ components: components.map((component) => component.toJSON(validationOverride))
1554
+ };
1555
+ validate(actionRowPredicate, data, validationOverride);
1556
+ return data;
1557
+ }
1558
+ };
1559
+
1325
1560
  // src/components/v2/Container.ts
1326
- var import_v1020 = require("discord-api-types/v10");
1561
+ var import_v1021 = require("discord-api-types/v10");
1327
1562
 
1328
1563
  // src/components/v2/Assertions.ts
1329
- var import_v1013 = require("discord-api-types/v10");
1564
+ var import_v1014 = require("discord-api-types/v10");
1330
1565
  var import_zod5 = require("zod");
1331
1566
  var unfurledMediaItemPredicate = import_zod5.z.object({
1332
1567
  url: import_zod5.z.url({ protocol: /^(?:https?|attachment)$/ })
@@ -1345,7 +1580,7 @@ var filePredicate = import_zod5.z.object({
1345
1580
  });
1346
1581
  var separatorPredicate = import_zod5.z.object({
1347
1582
  divider: import_zod5.z.boolean().optional(),
1348
- spacing: import_zod5.z.enum(import_v1013.SeparatorSpacingSize).optional()
1583
+ spacing: import_zod5.z.enum(import_v1014.SeparatorSpacingSize).optional()
1349
1584
  });
1350
1585
  var textDisplayPredicate = import_zod5.z.object({
1351
1586
  content: import_zod5.z.string().min(1).max(4e3)
@@ -1361,8 +1596,8 @@ var mediaGalleryPredicate = import_zod5.z.object({
1361
1596
  var sectionPredicate = import_zod5.z.object({
1362
1597
  components: import_zod5.z.array(textDisplayPredicate).min(1).max(3),
1363
1598
  accessory: import_zod5.z.union([
1364
- import_zod5.z.object({ type: import_zod5.z.literal(import_v1013.ComponentType.Button) }),
1365
- import_zod5.z.object({ type: import_zod5.z.literal(import_v1013.ComponentType.Thumbnail) })
1599
+ import_zod5.z.object({ type: import_zod5.z.literal(import_v1014.ComponentType.Button) }),
1600
+ import_zod5.z.object({ type: import_zod5.z.literal(import_v1014.ComponentType.Thumbnail) })
1366
1601
  ])
1367
1602
  });
1368
1603
  var containerPredicate = import_zod5.z.object({
@@ -1381,7 +1616,7 @@ var containerPredicate = import_zod5.z.object({
1381
1616
  });
1382
1617
 
1383
1618
  // src/components/v2/File.ts
1384
- var import_v1014 = require("discord-api-types/v10");
1619
+ var import_v1015 = require("discord-api-types/v10");
1385
1620
  var FileBuilder = class extends ComponentBuilder {
1386
1621
  static {
1387
1622
  __name(this, "FileBuilder");
@@ -1421,7 +1656,7 @@ var FileBuilder = class extends ComponentBuilder {
1421
1656
  this.data = {
1422
1657
  ...structuredClone(rest),
1423
1658
  file: file && { url: file.url },
1424
- type: import_v1014.ComponentType.File
1659
+ type: import_v1015.ComponentType.File
1425
1660
  };
1426
1661
  }
1427
1662
  /**
@@ -1453,7 +1688,7 @@ var FileBuilder = class extends ComponentBuilder {
1453
1688
  };
1454
1689
 
1455
1690
  // src/components/v2/MediaGallery.ts
1456
- var import_v1015 = require("discord-api-types/v10");
1691
+ var import_v1016 = require("discord-api-types/v10");
1457
1692
 
1458
1693
  // src/components/v2/MediaGalleryItem.ts
1459
1694
  var MediaGalleryItemBuilder = class {
@@ -1588,7 +1823,7 @@ var MediaGalleryBuilder = class extends ComponentBuilder {
1588
1823
  this.data = {
1589
1824
  ...structuredClone(rest),
1590
1825
  items: items.map((item) => new MediaGalleryItemBuilder(item)),
1591
- type: import_v1015.ComponentType.MediaGallery
1826
+ type: import_v1016.ComponentType.MediaGallery
1592
1827
  };
1593
1828
  }
1594
1829
  /**
@@ -1630,10 +1865,10 @@ var MediaGalleryBuilder = class extends ComponentBuilder {
1630
1865
  };
1631
1866
 
1632
1867
  // src/components/v2/Section.ts
1633
- var import_v1018 = require("discord-api-types/v10");
1868
+ var import_v1019 = require("discord-api-types/v10");
1634
1869
 
1635
1870
  // src/components/v2/TextDisplay.ts
1636
- var import_v1016 = require("discord-api-types/v10");
1871
+ var import_v1017 = require("discord-api-types/v10");
1637
1872
  var TextDisplayBuilder = class extends ComponentBuilder {
1638
1873
  static {
1639
1874
  __name(this, "TextDisplayBuilder");
@@ -1666,7 +1901,7 @@ var TextDisplayBuilder = class extends ComponentBuilder {
1666
1901
  super();
1667
1902
  this.data = {
1668
1903
  ...structuredClone(data),
1669
- type: import_v1016.ComponentType.TextDisplay
1904
+ type: import_v1017.ComponentType.TextDisplay
1670
1905
  };
1671
1906
  }
1672
1907
  /**
@@ -1689,7 +1924,7 @@ var TextDisplayBuilder = class extends ComponentBuilder {
1689
1924
  };
1690
1925
 
1691
1926
  // src/components/v2/Thumbnail.ts
1692
- var import_v1017 = require("discord-api-types/v10");
1927
+ var import_v1018 = require("discord-api-types/v10");
1693
1928
  var ThumbnailBuilder = class extends ComponentBuilder {
1694
1929
  static {
1695
1930
  __name(this, "ThumbnailBuilder");
@@ -1729,7 +1964,7 @@ var ThumbnailBuilder = class extends ComponentBuilder {
1729
1964
  this.data = {
1730
1965
  ...structuredClone(rest),
1731
1966
  media: media && { url: media.url },
1732
- type: import_v1017.ComponentType.Thumbnail
1967
+ type: import_v1018.ComponentType.Thumbnail
1733
1968
  };
1734
1969
  }
1735
1970
  /**
@@ -1833,7 +2068,7 @@ var SectionBuilder = class extends ComponentBuilder {
1833
2068
  ...structuredClone(rest),
1834
2069
  accessory: accessory && resolveAccessoryComponent(accessory),
1835
2070
  components: components.map((component) => new TextDisplayBuilder(component)),
1836
- type: import_v1018.ComponentType.Section
2071
+ type: import_v1019.ComponentType.Section
1837
2072
  };
1838
2073
  }
1839
2074
  /**
@@ -1946,7 +2181,7 @@ var SectionBuilder = class extends ComponentBuilder {
1946
2181
  };
1947
2182
 
1948
2183
  // src/components/v2/Separator.ts
1949
- var import_v1019 = require("discord-api-types/v10");
2184
+ var import_v1020 = require("discord-api-types/v10");
1950
2185
  var SeparatorBuilder = class extends ComponentBuilder {
1951
2186
  static {
1952
2187
  __name(this, "SeparatorBuilder");
@@ -1980,7 +2215,7 @@ var SeparatorBuilder = class extends ComponentBuilder {
1980
2215
  super();
1981
2216
  this.data = {
1982
2217
  ...structuredClone(data),
1983
- type: import_v1019.ComponentType.Separator
2218
+ type: import_v1020.ComponentType.Separator
1984
2219
  };
1985
2220
  }
1986
2221
  /**
@@ -2044,7 +2279,7 @@ var ContainerBuilder = class extends ComponentBuilder {
2044
2279
  this.data = {
2045
2280
  ...structuredClone(rest),
2046
2281
  components: components.map((component) => createComponentBuilder(component)),
2047
- type: import_v1020.ComponentType.Container
2282
+ type: import_v1021.ComponentType.Container
2048
2283
  };
2049
2284
  }
2050
2285
  /**
@@ -2194,36 +2429,38 @@ function createComponentBuilder(data) {
2194
2429
  return data;
2195
2430
  }
2196
2431
  switch (data.type) {
2197
- case import_v1021.ComponentType.ActionRow:
2432
+ case import_v1022.ComponentType.ActionRow:
2198
2433
  return new ActionRowBuilder(data);
2199
- case import_v1021.ComponentType.Button:
2434
+ case import_v1022.ComponentType.Button:
2200
2435
  return createButtonBuilder(data);
2201
- case import_v1021.ComponentType.StringSelect:
2436
+ case import_v1022.ComponentType.StringSelect:
2202
2437
  return new StringSelectMenuBuilder(data);
2203
- case import_v1021.ComponentType.TextInput:
2438
+ case import_v1022.ComponentType.TextInput:
2204
2439
  return new TextInputBuilder(data);
2205
- case import_v1021.ComponentType.UserSelect:
2440
+ case import_v1022.ComponentType.UserSelect:
2206
2441
  return new UserSelectMenuBuilder(data);
2207
- case import_v1021.ComponentType.RoleSelect:
2442
+ case import_v1022.ComponentType.RoleSelect:
2208
2443
  return new RoleSelectMenuBuilder(data);
2209
- case import_v1021.ComponentType.MentionableSelect:
2444
+ case import_v1022.ComponentType.MentionableSelect:
2210
2445
  return new MentionableSelectMenuBuilder(data);
2211
- case import_v1021.ComponentType.ChannelSelect:
2446
+ case import_v1022.ComponentType.ChannelSelect:
2212
2447
  return new ChannelSelectMenuBuilder(data);
2213
- case import_v1021.ComponentType.Thumbnail:
2448
+ case import_v1022.ComponentType.Thumbnail:
2214
2449
  return new ThumbnailBuilder(data);
2215
- case import_v1021.ComponentType.File:
2450
+ case import_v1022.ComponentType.File:
2216
2451
  return new FileBuilder(data);
2217
- case import_v1021.ComponentType.Separator:
2452
+ case import_v1022.ComponentType.Separator:
2218
2453
  return new SeparatorBuilder(data);
2219
- case import_v1021.ComponentType.TextDisplay:
2454
+ case import_v1022.ComponentType.TextDisplay:
2220
2455
  return new TextDisplayBuilder(data);
2221
- case import_v1021.ComponentType.MediaGallery:
2456
+ case import_v1022.ComponentType.MediaGallery:
2222
2457
  return new MediaGalleryBuilder(data);
2223
- case import_v1021.ComponentType.Section:
2458
+ case import_v1022.ComponentType.Section:
2224
2459
  return new SectionBuilder(data);
2225
- case import_v1021.ComponentType.Container:
2460
+ case import_v1022.ComponentType.Container:
2226
2461
  return new ContainerBuilder(data);
2462
+ case import_v1022.ComponentType.Label:
2463
+ return new LabelBuilder(data);
2227
2464
  default:
2228
2465
  throw new Error(`Cannot properly serialize component type: ${data.type}`);
2229
2466
  }
@@ -2231,17 +2468,17 @@ function createComponentBuilder(data) {
2231
2468
  __name(createComponentBuilder, "createComponentBuilder");
2232
2469
  function createButtonBuilder(data) {
2233
2470
  switch (data.style) {
2234
- case import_v1021.ButtonStyle.Primary:
2471
+ case import_v1022.ButtonStyle.Primary:
2235
2472
  return new PrimaryButtonBuilder(data);
2236
- case import_v1021.ButtonStyle.Secondary:
2473
+ case import_v1022.ButtonStyle.Secondary:
2237
2474
  return new SecondaryButtonBuilder(data);
2238
- case import_v1021.ButtonStyle.Success:
2475
+ case import_v1022.ButtonStyle.Success:
2239
2476
  return new SuccessButtonBuilder(data);
2240
- case import_v1021.ButtonStyle.Danger:
2477
+ case import_v1022.ButtonStyle.Danger:
2241
2478
  return new DangerButtonBuilder(data);
2242
- case import_v1021.ButtonStyle.Link:
2479
+ case import_v1022.ButtonStyle.Link:
2243
2480
  return new LinkButtonBuilder(data);
2244
- case import_v1021.ButtonStyle.Premium:
2481
+ case import_v1022.ButtonStyle.Premium:
2245
2482
  return new PremiumButtonBuilder(data);
2246
2483
  default:
2247
2484
  throw new Error(`Cannot properly serialize button with style: ${data.style}`);
@@ -2250,9 +2487,9 @@ function createButtonBuilder(data) {
2250
2487
  __name(createButtonBuilder, "createButtonBuilder");
2251
2488
  function resolveAccessoryComponent(component) {
2252
2489
  switch (component.type) {
2253
- case import_v1021.ComponentType.Button:
2490
+ case import_v1022.ComponentType.Button:
2254
2491
  return createButtonBuilder(component);
2255
- case import_v1021.ComponentType.Thumbnail:
2492
+ case import_v1022.ComponentType.Thumbnail:
2256
2493
  return new ThumbnailBuilder(component);
2257
2494
  default:
2258
2495
  throw new Error(`Cannot properly serialize section accessory component: ${component.type}`);
@@ -2260,232 +2497,108 @@ function resolveAccessoryComponent(component) {
2260
2497
  }
2261
2498
  __name(resolveAccessoryComponent, "resolveAccessoryComponent");
2262
2499
 
2263
- // src/components/ActionRow.ts
2264
- var ActionRowBuilder = class extends ComponentBuilder {
2500
+ // src/components/label/Assertions.ts
2501
+ var import_v1023 = require("discord-api-types/v10");
2502
+ var import_zod6 = require("zod");
2503
+ var labelPredicate2 = import_zod6.z.object({
2504
+ type: import_zod6.z.literal(import_v1023.ComponentType.Label),
2505
+ label: import_zod6.z.string().min(1).max(45),
2506
+ description: import_zod6.z.string().min(1).max(100).optional(),
2507
+ component: import_zod6.z.union([selectMenuStringPredicate, textInputPredicate])
2508
+ });
2509
+
2510
+ // src/components/label/Label.ts
2511
+ var LabelBuilder = class extends ComponentBuilder {
2265
2512
  static {
2266
- __name(this, "ActionRowBuilder");
2513
+ __name(this, "LabelBuilder");
2267
2514
  }
2268
2515
  /**
2269
2516
  * @internal
2270
2517
  */
2271
2518
  data;
2272
2519
  /**
2273
- * The components within this action row.
2274
- */
2275
- get components() {
2276
- return this.data.components;
2277
- }
2278
- /**
2279
- * Creates a new action row.
2520
+ * Creates a new label.
2280
2521
  *
2281
- * @param data - The API data to create this action row with
2522
+ * @param data - The API data to create this label with
2282
2523
  * @example
2283
- * Creating an action row from an API data object:
2524
+ * Creating a label from an API data object:
2284
2525
  * ```ts
2285
- * const actionRow = new ActionRowBuilder({
2286
- * components: [
2287
- * {
2288
- * custom_id: "custom id",
2289
- * label: "Type something",
2290
- * style: TextInputStyle.Short,
2291
- * type: ComponentType.TextInput,
2292
- * },
2293
- * ],
2526
+ * const label = new LabelBuilder({
2527
+ * label: "label",
2528
+ * component,
2294
2529
  * });
2295
2530
  * ```
2296
2531
  * @example
2297
- * Creating an action row using setters and API data:
2532
+ * Creating a label using setters and API data:
2298
2533
  * ```ts
2299
- * const actionRow = new ActionRowBuilder({
2300
- * components: [
2301
- * {
2302
- * custom_id: "custom id",
2303
- * label: "Click me",
2304
- * style: ButtonStyle.Primary,
2305
- * type: ComponentType.Button,
2306
- * },
2307
- * ],
2308
- * })
2309
- * .addComponents(button2, button3);
2534
+ * const label = new LabelBuilder({
2535
+ * label: 'label',
2536
+ * component,
2537
+ * }).setContent('new text');
2310
2538
  * ```
2311
2539
  */
2312
2540
  constructor(data = {}) {
2313
2541
  super();
2314
- const { components = [], ...rest } = data;
2542
+ const { component, ...rest } = data;
2315
2543
  this.data = {
2316
2544
  ...structuredClone(rest),
2317
- components: components.map((component) => createComponentBuilder(component)),
2318
- type: import_v1022.ComponentType.ActionRow
2545
+ component: component ? createComponentBuilder(component) : void 0,
2546
+ type: import_v1024.ComponentType.Label
2319
2547
  };
2320
2548
  }
2321
2549
  /**
2322
- * Adds primary button components to this action row.
2323
- *
2324
- * @param input - The buttons to add
2325
- */
2326
- addPrimaryButtonComponents(...input) {
2327
- const normalized = normalizeArray(input);
2328
- const resolved = normalized.map((component) => resolveBuilder(component, PrimaryButtonBuilder));
2329
- this.data.components.push(...resolved);
2330
- return this;
2331
- }
2332
- /**
2333
- * Adds secondary button components to this action row.
2334
- *
2335
- * @param input - The buttons to add
2336
- */
2337
- addSecondaryButtonComponents(...input) {
2338
- const normalized = normalizeArray(input);
2339
- const resolved = normalized.map((component) => resolveBuilder(component, SecondaryButtonBuilder));
2340
- this.data.components.push(...resolved);
2341
- return this;
2342
- }
2343
- /**
2344
- * Adds success button components to this action row.
2345
- *
2346
- * @param input - The buttons to add
2347
- */
2348
- addSuccessButtonComponents(...input) {
2349
- const normalized = normalizeArray(input);
2350
- const resolved = normalized.map((component) => resolveBuilder(component, SuccessButtonBuilder));
2351
- this.data.components.push(...resolved);
2352
- return this;
2353
- }
2354
- /**
2355
- * Adds danger button components to this action row.
2356
- */
2357
- addDangerButtonComponents(...input) {
2358
- const normalized = normalizeArray(input);
2359
- const resolved = normalized.map((component) => resolveBuilder(component, DangerButtonBuilder));
2360
- this.data.components.push(...resolved);
2361
- return this;
2362
- }
2363
- /**
2364
- * Generically add any type of component to this action row, only takes in an instance of a component builder.
2365
- */
2366
- addComponents(...input) {
2367
- const normalized = normalizeArray(input);
2368
- this.data.components.push(...normalized);
2369
- return this;
2370
- }
2371
- /**
2372
- * Adds SKU id button components to this action row.
2373
- *
2374
- * @param input - The buttons to add
2375
- */
2376
- addPremiumButtonComponents(...input) {
2377
- const normalized = normalizeArray(input);
2378
- const resolved = normalized.map((component) => resolveBuilder(component, PremiumButtonBuilder));
2379
- this.data.components.push(...resolved);
2380
- return this;
2381
- }
2382
- /**
2383
- * Adds URL button components to this action row.
2384
- *
2385
- * @param input - The buttons to add
2386
- */
2387
- addLinkButtonComponents(...input) {
2388
- const normalized = normalizeArray(input);
2389
- const resolved = normalized.map((component) => resolveBuilder(component, LinkButtonBuilder));
2390
- this.data.components.push(...resolved);
2391
- return this;
2392
- }
2393
- /**
2394
- * Adds a channel select menu component to this action row.
2395
- *
2396
- * @param input - A function that returns a component builder or an already built builder
2397
- */
2398
- addChannelSelectMenuComponent(input) {
2399
- this.data.components.push(resolveBuilder(input, ChannelSelectMenuBuilder));
2400
- return this;
2401
- }
2402
- /**
2403
- * Adds a mentionable select menu component to this action row.
2550
+ * Sets the label for this label.
2404
2551
  *
2405
- * @param input - A function that returns a component builder or an already built builder
2552
+ * @param label - The label to use
2406
2553
  */
2407
- addMentionableSelectMenuComponent(input) {
2408
- this.data.components.push(resolveBuilder(input, MentionableSelectMenuBuilder));
2554
+ setLabel(label) {
2555
+ this.data.label = label;
2409
2556
  return this;
2410
2557
  }
2411
2558
  /**
2412
- * Adds a role select menu component to this action row.
2559
+ * Sets the description for this label.
2413
2560
  *
2414
- * @param input - A function that returns a component builder or an already built builder
2561
+ * @param description - The description to use
2415
2562
  */
2416
- addRoleSelectMenuComponent(input) {
2417
- this.data.components.push(resolveBuilder(input, RoleSelectMenuBuilder));
2563
+ setDescription(description) {
2564
+ this.data.description = description;
2418
2565
  return this;
2419
2566
  }
2420
2567
  /**
2421
- * Adds a string select menu component to this action row.
2422
- *
2423
- * @param input - A function that returns a component builder or an already built builder
2568
+ * Clears the description for this label.
2424
2569
  */
2425
- addStringSelectMenuComponent(input) {
2426
- this.data.components.push(resolveBuilder(input, StringSelectMenuBuilder));
2570
+ clearDescription() {
2571
+ this.data.description = void 0;
2427
2572
  return this;
2428
2573
  }
2429
2574
  /**
2430
- * Adds a user select menu component to this action row.
2575
+ * Sets a string select menu component to this label.
2431
2576
  *
2432
2577
  * @param input - A function that returns a component builder or an already built builder
2433
2578
  */
2434
- addUserSelectMenuComponent(input) {
2435
- this.data.components.push(resolveBuilder(input, UserSelectMenuBuilder));
2579
+ setStringSelectMenuComponent(input) {
2580
+ this.data.component = resolveBuilder(input, StringSelectMenuBuilder);
2436
2581
  return this;
2437
2582
  }
2438
2583
  /**
2439
- * Adds a text input component to this action row.
2584
+ * Sets a text input component to this label.
2440
2585
  *
2441
2586
  * @param input - A function that returns a component builder or an already built builder
2442
2587
  */
2443
- addTextInputComponent(input) {
2444
- this.data.components.push(resolveBuilder(input, TextInputBuilder));
2445
- return this;
2446
- }
2447
- /**
2448
- * Removes, replaces, or inserts components for this action row.
2449
- *
2450
- * @remarks
2451
- * This method behaves similarly
2452
- * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
2453
- *
2454
- * It's useful for modifying and adjusting order of the already-existing components of an action row.
2455
- * @example
2456
- * Remove the first component:
2457
- * ```ts
2458
- * actionRow.spliceComponents(0, 1);
2459
- * ```
2460
- * @example
2461
- * Remove the first n components:
2462
- * ```ts
2463
- * const n = 4;
2464
- * actionRow.spliceComponents(0, n);
2465
- * ```
2466
- * @example
2467
- * Remove the last component:
2468
- * ```ts
2469
- * actionRow.spliceComponents(-1, 1);
2470
- * ```
2471
- * @param index - The index to start at
2472
- * @param deleteCount - The number of components to remove
2473
- * @param components - The replacing component objects
2474
- */
2475
- spliceComponents(index, deleteCount, ...components) {
2476
- this.data.components.splice(index, deleteCount, ...components);
2588
+ setTextInputComponent(input) {
2589
+ this.data.component = resolveBuilder(input, TextInputBuilder);
2477
2590
  return this;
2478
2591
  }
2479
2592
  /**
2480
2593
  * {@inheritDoc ComponentBuilder.toJSON}
2481
2594
  */
2482
2595
  toJSON(validationOverride) {
2483
- const { components, ...rest } = this.data;
2596
+ const { component, ...rest } = this.data;
2484
2597
  const data = {
2485
2598
  ...structuredClone(rest),
2486
- components: components.map((component) => component.toJSON(validationOverride))
2599
+ component: component?.toJSON(false)
2487
2600
  };
2488
- validate(actionRowPredicate, data, validationOverride);
2601
+ validate(labelPredicate2, data, validationOverride);
2489
2602
  return data;
2490
2603
  }
2491
2604
  };
@@ -2530,18 +2643,18 @@ var ApplicationCommandNumericOptionMinMaxValueMixin = class {
2530
2643
  };
2531
2644
 
2532
2645
  // src/interactions/commands/chatInput/mixins/ApplicationCommandOptionChannelTypesMixin.ts
2533
- var import_v1023 = require("discord-api-types/v10");
2646
+ var import_v1025 = require("discord-api-types/v10");
2534
2647
  var ApplicationCommandOptionAllowedChannelTypes = [
2535
- import_v1023.ChannelType.GuildText,
2536
- import_v1023.ChannelType.GuildVoice,
2537
- import_v1023.ChannelType.GuildCategory,
2538
- import_v1023.ChannelType.GuildAnnouncement,
2539
- import_v1023.ChannelType.AnnouncementThread,
2540
- import_v1023.ChannelType.PublicThread,
2541
- import_v1023.ChannelType.PrivateThread,
2542
- import_v1023.ChannelType.GuildStageVoice,
2543
- import_v1023.ChannelType.GuildForum,
2544
- import_v1023.ChannelType.GuildMedia
2648
+ import_v1025.ChannelType.GuildText,
2649
+ import_v1025.ChannelType.GuildVoice,
2650
+ import_v1025.ChannelType.GuildCategory,
2651
+ import_v1025.ChannelType.GuildAnnouncement,
2652
+ import_v1025.ChannelType.AnnouncementThread,
2653
+ import_v1025.ChannelType.PublicThread,
2654
+ import_v1025.ChannelType.PrivateThread,
2655
+ import_v1025.ChannelType.GuildStageVoice,
2656
+ import_v1025.ChannelType.GuildForum,
2657
+ import_v1025.ChannelType.GuildMedia
2545
2658
  ];
2546
2659
  var ApplicationCommandOptionChannelTypesMixin = class {
2547
2660
  static {
@@ -2612,7 +2725,7 @@ var ApplicationCommandOptionWithChoicesMixin = class {
2612
2725
  };
2613
2726
 
2614
2727
  // src/interactions/commands/chatInput/options/attachment.ts
2615
- var import_v1025 = require("discord-api-types/v10");
2728
+ var import_v1027 = require("discord-api-types/v10");
2616
2729
 
2617
2730
  // src/interactions/commands/SharedName.ts
2618
2731
  var SharedName = class {
@@ -2729,34 +2842,34 @@ var SharedNameAndDescription = class extends SharedName {
2729
2842
  };
2730
2843
 
2731
2844
  // src/interactions/commands/chatInput/Assertions.ts
2732
- var import_v1024 = require("discord-api-types/v10");
2733
- var import_zod6 = require("zod");
2734
- var namePredicate = import_zod6.z.string().min(1).max(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
2735
- var descriptionPredicate = import_zod6.z.string().min(1).max(100);
2736
- var sharedNameAndDescriptionPredicate = import_zod6.z.object({
2845
+ var import_v1026 = require("discord-api-types/v10");
2846
+ var import_zod7 = require("zod");
2847
+ var namePredicate = import_zod7.z.string().min(1).max(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u);
2848
+ var descriptionPredicate = import_zod7.z.string().min(1).max(100);
2849
+ var sharedNameAndDescriptionPredicate = import_zod7.z.object({
2737
2850
  name: namePredicate,
2738
2851
  name_localizations: localeMapPredicate.optional(),
2739
2852
  description: descriptionPredicate,
2740
2853
  description_localizations: localeMapPredicate.optional()
2741
2854
  });
2742
- var numericMixinNumberOptionPredicate = import_zod6.z.object({
2743
- max_value: import_zod6.z.float32().optional(),
2744
- min_value: import_zod6.z.float32().optional()
2855
+ var numericMixinNumberOptionPredicate = import_zod7.z.object({
2856
+ max_value: import_zod7.z.float32().optional(),
2857
+ min_value: import_zod7.z.float32().optional()
2745
2858
  });
2746
- var numericMixinIntegerOptionPredicate = import_zod6.z.object({
2747
- max_value: import_zod6.z.int().optional(),
2748
- min_value: import_zod6.z.int().optional()
2859
+ var numericMixinIntegerOptionPredicate = import_zod7.z.object({
2860
+ max_value: import_zod7.z.int().optional(),
2861
+ min_value: import_zod7.z.int().optional()
2749
2862
  });
2750
- var channelMixinOptionPredicate = import_zod6.z.object({
2751
- channel_types: import_zod6.z.literal(ApplicationCommandOptionAllowedChannelTypes).array().optional()
2863
+ var channelMixinOptionPredicate = import_zod7.z.object({
2864
+ channel_types: import_zod7.z.literal(ApplicationCommandOptionAllowedChannelTypes).array().optional()
2752
2865
  });
2753
- var autocompleteMixinOptionPredicate = import_zod6.z.object({
2754
- autocomplete: import_zod6.z.literal(true),
2755
- choices: import_zod6.z.union([import_zod6.z.never(), import_zod6.z.never().array(), import_zod6.z.undefined()])
2866
+ var autocompleteMixinOptionPredicate = import_zod7.z.object({
2867
+ autocomplete: import_zod7.z.literal(true),
2868
+ choices: import_zod7.z.union([import_zod7.z.never(), import_zod7.z.never().array(), import_zod7.z.undefined()])
2756
2869
  });
2757
- var choiceValueStringPredicate = import_zod6.z.string().min(1).max(100);
2758
- var choiceValueNumberPredicate = import_zod6.z.number();
2759
- var choiceBasePredicate = import_zod6.z.object({
2870
+ var choiceValueStringPredicate = import_zod7.z.string().min(1).max(100);
2871
+ var choiceValueNumberPredicate = import_zod7.z.number();
2872
+ var choiceBasePredicate = import_zod7.z.object({
2760
2873
  name: choiceValueStringPredicate,
2761
2874
  name_localizations: localeMapPredicate.optional()
2762
2875
  });
@@ -2766,8 +2879,8 @@ var choiceStringPredicate = choiceBasePredicate.extend({
2766
2879
  var choiceNumberPredicate = choiceBasePredicate.extend({
2767
2880
  value: choiceValueNumberPredicate
2768
2881
  });
2769
- var choiceBaseMixinPredicate = import_zod6.z.object({
2770
- autocomplete: import_zod6.z.literal(false).optional()
2882
+ var choiceBaseMixinPredicate = import_zod7.z.object({
2883
+ autocomplete: import_zod7.z.literal(false).optional()
2771
2884
  });
2772
2885
  var choiceStringMixinPredicate = choiceBaseMixinPredicate.extend({
2773
2886
  choices: choiceStringPredicate.array().max(25).optional()
@@ -2775,66 +2888,66 @@ var choiceStringMixinPredicate = choiceBaseMixinPredicate.extend({
2775
2888
  var choiceNumberMixinPredicate = choiceBaseMixinPredicate.extend({
2776
2889
  choices: choiceNumberPredicate.array().max(25).optional()
2777
2890
  });
2778
- var basicOptionTypesPredicate = import_zod6.z.literal([
2779
- import_v1024.ApplicationCommandOptionType.Attachment,
2780
- import_v1024.ApplicationCommandOptionType.Boolean,
2781
- import_v1024.ApplicationCommandOptionType.Channel,
2782
- import_v1024.ApplicationCommandOptionType.Integer,
2783
- import_v1024.ApplicationCommandOptionType.Mentionable,
2784
- import_v1024.ApplicationCommandOptionType.Number,
2785
- import_v1024.ApplicationCommandOptionType.Role,
2786
- import_v1024.ApplicationCommandOptionType.String,
2787
- import_v1024.ApplicationCommandOptionType.User
2891
+ var basicOptionTypesPredicate = import_zod7.z.literal([
2892
+ import_v1026.ApplicationCommandOptionType.Attachment,
2893
+ import_v1026.ApplicationCommandOptionType.Boolean,
2894
+ import_v1026.ApplicationCommandOptionType.Channel,
2895
+ import_v1026.ApplicationCommandOptionType.Integer,
2896
+ import_v1026.ApplicationCommandOptionType.Mentionable,
2897
+ import_v1026.ApplicationCommandOptionType.Number,
2898
+ import_v1026.ApplicationCommandOptionType.Role,
2899
+ import_v1026.ApplicationCommandOptionType.String,
2900
+ import_v1026.ApplicationCommandOptionType.User
2788
2901
  ]);
2789
2902
  var basicOptionPredicate = sharedNameAndDescriptionPredicate.extend({
2790
- required: import_zod6.z.boolean().optional(),
2903
+ required: import_zod7.z.boolean().optional(),
2791
2904
  type: basicOptionTypesPredicate
2792
2905
  });
2793
- var autocompleteOrStringChoicesMixinOptionPredicate = import_zod6.z.discriminatedUnion("autocomplete", [
2906
+ var autocompleteOrStringChoicesMixinOptionPredicate = import_zod7.z.discriminatedUnion("autocomplete", [
2794
2907
  autocompleteMixinOptionPredicate,
2795
2908
  choiceStringMixinPredicate
2796
2909
  ]);
2797
- var autocompleteOrNumberChoicesMixinOptionPredicate = import_zod6.z.discriminatedUnion("autocomplete", [
2910
+ var autocompleteOrNumberChoicesMixinOptionPredicate = import_zod7.z.discriminatedUnion("autocomplete", [
2798
2911
  autocompleteMixinOptionPredicate,
2799
2912
  choiceNumberMixinPredicate
2800
2913
  ]);
2801
- var channelOptionPredicate = import_zod6.z.object({
2914
+ var channelOptionPredicate = import_zod7.z.object({
2802
2915
  ...basicOptionPredicate.shape,
2803
2916
  ...channelMixinOptionPredicate.shape
2804
2917
  });
2805
- var integerOptionPredicate = import_zod6.z.object({
2918
+ var integerOptionPredicate = import_zod7.z.object({
2806
2919
  ...basicOptionPredicate.shape,
2807
2920
  ...numericMixinIntegerOptionPredicate.shape
2808
2921
  }).and(autocompleteOrNumberChoicesMixinOptionPredicate);
2809
- var numberOptionPredicate = import_zod6.z.object({
2922
+ var numberOptionPredicate = import_zod7.z.object({
2810
2923
  ...basicOptionPredicate.shape,
2811
2924
  ...numericMixinNumberOptionPredicate.shape
2812
2925
  }).and(autocompleteOrNumberChoicesMixinOptionPredicate);
2813
2926
  var stringOptionPredicate = basicOptionPredicate.extend({
2814
- max_length: import_zod6.z.number().min(0).max(6e3).optional(),
2815
- min_length: import_zod6.z.number().min(1).max(6e3).optional()
2927
+ max_length: import_zod7.z.number().min(0).max(6e3).optional(),
2928
+ min_length: import_zod7.z.number().min(1).max(6e3).optional()
2816
2929
  }).and(autocompleteOrStringChoicesMixinOptionPredicate);
2817
2930
  var baseChatInputCommandPredicate = sharedNameAndDescriptionPredicate.extend({
2818
- contexts: import_zod6.z.array(import_zod6.z.enum(import_v1024.InteractionContextType)).optional(),
2931
+ contexts: import_zod7.z.array(import_zod7.z.enum(import_v1026.InteractionContextType)).optional(),
2819
2932
  default_member_permissions: memberPermissionsPredicate.optional(),
2820
- integration_types: import_zod6.z.array(import_zod6.z.enum(import_v1024.ApplicationIntegrationType)).optional(),
2821
- nsfw: import_zod6.z.boolean().optional()
2933
+ integration_types: import_zod7.z.array(import_zod7.z.enum(import_v1026.ApplicationIntegrationType)).optional(),
2934
+ nsfw: import_zod7.z.boolean().optional()
2822
2935
  });
2823
- var chatInputCommandOptionsPredicate = import_zod6.z.union([
2824
- import_zod6.z.object({ type: basicOptionTypesPredicate }).array(),
2825
- import_zod6.z.object({ type: import_zod6.z.literal(import_v1024.ApplicationCommandOptionType.Subcommand) }).array(),
2826
- import_zod6.z.object({ type: import_zod6.z.literal(import_v1024.ApplicationCommandOptionType.SubcommandGroup) }).array()
2936
+ var chatInputCommandOptionsPredicate = import_zod7.z.union([
2937
+ import_zod7.z.object({ type: basicOptionTypesPredicate }).array(),
2938
+ import_zod7.z.object({ type: import_zod7.z.literal(import_v1026.ApplicationCommandOptionType.Subcommand) }).array(),
2939
+ import_zod7.z.object({ type: import_zod7.z.literal(import_v1026.ApplicationCommandOptionType.SubcommandGroup) }).array()
2827
2940
  ]);
2828
2941
  var chatInputCommandPredicate = baseChatInputCommandPredicate.extend({
2829
2942
  options: chatInputCommandOptionsPredicate.optional()
2830
2943
  });
2831
2944
  var chatInputCommandSubcommandGroupPredicate = sharedNameAndDescriptionPredicate.extend({
2832
- type: import_zod6.z.literal(import_v1024.ApplicationCommandOptionType.SubcommandGroup),
2833
- options: import_zod6.z.array(import_zod6.z.object({ type: import_zod6.z.literal(import_v1024.ApplicationCommandOptionType.Subcommand) })).min(1).max(25)
2945
+ type: import_zod7.z.literal(import_v1026.ApplicationCommandOptionType.SubcommandGroup),
2946
+ options: import_zod7.z.array(import_zod7.z.object({ type: import_zod7.z.literal(import_v1026.ApplicationCommandOptionType.Subcommand) })).min(1).max(25)
2834
2947
  });
2835
2948
  var chatInputCommandSubcommandPredicate = sharedNameAndDescriptionPredicate.extend({
2836
- type: import_zod6.z.literal(import_v1024.ApplicationCommandOptionType.Subcommand),
2837
- options: import_zod6.z.array(import_zod6.z.object({ type: basicOptionTypesPredicate })).max(25)
2949
+ type: import_zod7.z.literal(import_v1026.ApplicationCommandOptionType.Subcommand),
2950
+ options: import_zod7.z.array(import_zod7.z.object({ type: basicOptionTypesPredicate })).max(25)
2838
2951
  });
2839
2952
 
2840
2953
  // src/interactions/commands/chatInput/options/ApplicationCommandOptionBase.ts
@@ -2887,12 +3000,12 @@ var ChatInputCommandAttachmentOption = class extends ApplicationCommandOptionBas
2887
3000
  * Creates a new attachment option.
2888
3001
  */
2889
3002
  constructor() {
2890
- super(import_v1025.ApplicationCommandOptionType.Attachment);
3003
+ super(import_v1027.ApplicationCommandOptionType.Attachment);
2891
3004
  }
2892
3005
  };
2893
3006
 
2894
3007
  // src/interactions/commands/chatInput/options/boolean.ts
2895
- var import_v1026 = require("discord-api-types/v10");
3008
+ var import_v1028 = require("discord-api-types/v10");
2896
3009
  var ChatInputCommandBooleanOption = class extends ApplicationCommandOptionBase {
2897
3010
  static {
2898
3011
  __name(this, "ChatInputCommandBooleanOption");
@@ -2901,12 +3014,12 @@ var ChatInputCommandBooleanOption = class extends ApplicationCommandOptionBase {
2901
3014
  * Creates a new boolean option.
2902
3015
  */
2903
3016
  constructor() {
2904
- super(import_v1026.ApplicationCommandOptionType.Boolean);
3017
+ super(import_v1028.ApplicationCommandOptionType.Boolean);
2905
3018
  }
2906
3019
  };
2907
3020
 
2908
3021
  // src/interactions/commands/chatInput/options/channel.ts
2909
- var import_v1027 = require("discord-api-types/v10");
3022
+ var import_v1029 = require("discord-api-types/v10");
2910
3023
  var import_ts_mixer3 = require("ts-mixer");
2911
3024
  var ChatInputCommandChannelOption = class extends (0, import_ts_mixer3.Mixin)(
2912
3025
  ApplicationCommandOptionBase,
@@ -2923,12 +3036,12 @@ var ChatInputCommandChannelOption = class extends (0, import_ts_mixer3.Mixin)(
2923
3036
  * Creates a new channel option.
2924
3037
  */
2925
3038
  constructor() {
2926
- super(import_v1027.ApplicationCommandOptionType.Channel);
3039
+ super(import_v1029.ApplicationCommandOptionType.Channel);
2927
3040
  }
2928
3041
  };
2929
3042
 
2930
3043
  // src/interactions/commands/chatInput/options/integer.ts
2931
- var import_v1028 = require("discord-api-types/v10");
3044
+ var import_v1030 = require("discord-api-types/v10");
2932
3045
  var import_ts_mixer4 = require("ts-mixer");
2933
3046
  var ChatInputCommandIntegerOption = class extends (0, import_ts_mixer4.Mixin)(
2934
3047
  ApplicationCommandOptionBase,
@@ -2947,12 +3060,12 @@ var ChatInputCommandIntegerOption = class extends (0, import_ts_mixer4.Mixin)(
2947
3060
  * Creates a new integer option.
2948
3061
  */
2949
3062
  constructor() {
2950
- super(import_v1028.ApplicationCommandOptionType.Integer);
3063
+ super(import_v1030.ApplicationCommandOptionType.Integer);
2951
3064
  }
2952
3065
  };
2953
3066
 
2954
3067
  // src/interactions/commands/chatInput/options/mentionable.ts
2955
- var import_v1029 = require("discord-api-types/v10");
3068
+ var import_v1031 = require("discord-api-types/v10");
2956
3069
  var ChatInputCommandMentionableOption = class extends ApplicationCommandOptionBase {
2957
3070
  static {
2958
3071
  __name(this, "ChatInputCommandMentionableOption");
@@ -2961,12 +3074,12 @@ var ChatInputCommandMentionableOption = class extends ApplicationCommandOptionBa
2961
3074
  * Creates a new mentionable option.
2962
3075
  */
2963
3076
  constructor() {
2964
- super(import_v1029.ApplicationCommandOptionType.Mentionable);
3077
+ super(import_v1031.ApplicationCommandOptionType.Mentionable);
2965
3078
  }
2966
3079
  };
2967
3080
 
2968
3081
  // src/interactions/commands/chatInput/options/number.ts
2969
- var import_v1030 = require("discord-api-types/v10");
3082
+ var import_v1032 = require("discord-api-types/v10");
2970
3083
  var import_ts_mixer5 = require("ts-mixer");
2971
3084
  var ChatInputCommandNumberOption = class extends (0, import_ts_mixer5.Mixin)(
2972
3085
  ApplicationCommandOptionBase,
@@ -2985,12 +3098,12 @@ var ChatInputCommandNumberOption = class extends (0, import_ts_mixer5.Mixin)(
2985
3098
  * Creates a new number option.
2986
3099
  */
2987
3100
  constructor() {
2988
- super(import_v1030.ApplicationCommandOptionType.Number);
3101
+ super(import_v1032.ApplicationCommandOptionType.Number);
2989
3102
  }
2990
3103
  };
2991
3104
 
2992
3105
  // src/interactions/commands/chatInput/options/role.ts
2993
- var import_v1031 = require("discord-api-types/v10");
3106
+ var import_v1033 = require("discord-api-types/v10");
2994
3107
  var ChatInputCommandRoleOption = class extends ApplicationCommandOptionBase {
2995
3108
  static {
2996
3109
  __name(this, "ChatInputCommandRoleOption");
@@ -2999,12 +3112,12 @@ var ChatInputCommandRoleOption = class extends ApplicationCommandOptionBase {
2999
3112
  * Creates a new role option.
3000
3113
  */
3001
3114
  constructor() {
3002
- super(import_v1031.ApplicationCommandOptionType.Role);
3115
+ super(import_v1033.ApplicationCommandOptionType.Role);
3003
3116
  }
3004
3117
  };
3005
3118
 
3006
3119
  // src/interactions/commands/chatInput/options/string.ts
3007
- var import_v1032 = require("discord-api-types/v10");
3120
+ var import_v1034 = require("discord-api-types/v10");
3008
3121
  var import_ts_mixer6 = require("ts-mixer");
3009
3122
  var ChatInputCommandStringOption = class extends (0, import_ts_mixer6.Mixin)(
3010
3123
  ApplicationCommandOptionBase,
@@ -3022,7 +3135,7 @@ var ChatInputCommandStringOption = class extends (0, import_ts_mixer6.Mixin)(
3022
3135
  * Creates a new string option builder.
3023
3136
  */
3024
3137
  constructor() {
3025
- super(import_v1032.ApplicationCommandOptionType.String);
3138
+ super(import_v1034.ApplicationCommandOptionType.String);
3026
3139
  }
3027
3140
  /**
3028
3141
  * Sets the maximum length of this string option.
@@ -3059,7 +3172,7 @@ var ChatInputCommandStringOption = class extends (0, import_ts_mixer6.Mixin)(
3059
3172
  };
3060
3173
 
3061
3174
  // src/interactions/commands/chatInput/options/user.ts
3062
- var import_v1033 = require("discord-api-types/v10");
3175
+ var import_v1035 = require("discord-api-types/v10");
3063
3176
  var ChatInputCommandUserOption = class extends ApplicationCommandOptionBase {
3064
3177
  static {
3065
3178
  __name(this, "ChatInputCommandUserOption");
@@ -3068,7 +3181,7 @@ var ChatInputCommandUserOption = class extends ApplicationCommandOptionBase {
3068
3181
  * Creates a new user option.
3069
3182
  */
3070
3183
  constructor() {
3071
- super(import_v1033.ApplicationCommandOptionType.User);
3184
+ super(import_v1035.ApplicationCommandOptionType.User);
3072
3185
  }
3073
3186
  };
3074
3187
 
@@ -3203,7 +3316,7 @@ var SharedChatInputCommandOptions = class {
3203
3316
  };
3204
3317
 
3205
3318
  // src/interactions/commands/chatInput/ChatInputCommandSubcommands.ts
3206
- var import_v1034 = require("discord-api-types/v10");
3319
+ var import_v1036 = require("discord-api-types/v10");
3207
3320
  var import_ts_mixer7 = require("ts-mixer");
3208
3321
  var ChatInputCommandSubcommandGroupBuilder = class extends SharedNameAndDescription {
3209
3322
  static {
@@ -3238,7 +3351,7 @@ var ChatInputCommandSubcommandGroupBuilder = class extends SharedNameAndDescript
3238
3351
  const { options, ...rest } = this.data;
3239
3352
  const data = {
3240
3353
  ...structuredClone(rest),
3241
- type: import_v1034.ApplicationCommandOptionType.SubcommandGroup,
3354
+ type: import_v1036.ApplicationCommandOptionType.SubcommandGroup,
3242
3355
  options: options?.map((option) => option.toJSON(validationOverride)) ?? []
3243
3356
  };
3244
3357
  validate(chatInputCommandSubcommandGroupPredicate, data, validationOverride);
@@ -3260,7 +3373,7 @@ var ChatInputCommandSubcommandBuilder = class extends (0, import_ts_mixer7.Mixin
3260
3373
  const { options, ...rest } = this.data;
3261
3374
  const data = {
3262
3375
  ...structuredClone(rest),
3263
- type: import_v1034.ApplicationCommandOptionType.Subcommand,
3376
+ type: import_v1036.ApplicationCommandOptionType.Subcommand,
3264
3377
  options: options?.map((option) => option.toJSON(validationOverride)) ?? []
3265
3378
  };
3266
3379
  validate(chatInputCommandSubcommandPredicate, data, validationOverride);
@@ -3300,7 +3413,7 @@ var SharedChatInputCommandSubcommands = class {
3300
3413
  };
3301
3414
 
3302
3415
  // src/interactions/commands/chatInput/ChatInputCommand.ts
3303
- var import_v1035 = require("discord-api-types/v10");
3416
+ var import_v1037 = require("discord-api-types/v10");
3304
3417
  var import_ts_mixer8 = require("ts-mixer");
3305
3418
 
3306
3419
  // src/interactions/commands/Command.ts
@@ -3373,7 +3486,7 @@ var ChatInputCommandBuilder = class extends (0, import_ts_mixer8.Mixin)(
3373
3486
  const { options, ...rest } = this.data;
3374
3487
  const data = {
3375
3488
  ...structuredClone(rest),
3376
- type: import_v1035.ApplicationCommandType.ChatInput,
3489
+ type: import_v1037.ApplicationCommandType.ChatInput,
3377
3490
  options: options?.map((option) => option.toJSON(validationOverride))
3378
3491
  };
3379
3492
  validate(chatInputCommandPredicate, data, validationOverride);
@@ -3382,26 +3495,26 @@ var ChatInputCommandBuilder = class extends (0, import_ts_mixer8.Mixin)(
3382
3495
  };
3383
3496
 
3384
3497
  // src/interactions/commands/contextMenu/Assertions.ts
3385
- var import_v1036 = require("discord-api-types/v10");
3386
- var import_zod7 = require("zod");
3387
- var namePredicate2 = import_zod7.z.string().min(1).max(32).refine((val) => val.trim().length > 0, {
3498
+ var import_v1038 = require("discord-api-types/v10");
3499
+ var import_zod8 = require("zod");
3500
+ var namePredicate2 = import_zod8.z.string().min(1).max(32).refine((val) => val.trim().length > 0, {
3388
3501
  error: "Must not consist of only whitespace."
3389
3502
  });
3390
- var contextsPredicate = import_zod7.z.array(import_zod7.z.enum(import_v1036.InteractionContextType));
3391
- var integrationTypesPredicate = import_zod7.z.array(import_zod7.z.enum(import_v1036.ApplicationIntegrationType));
3392
- var baseContextMenuCommandPredicate = import_zod7.z.object({
3503
+ var contextsPredicate = import_zod8.z.array(import_zod8.z.enum(import_v1038.InteractionContextType));
3504
+ var integrationTypesPredicate = import_zod8.z.array(import_zod8.z.enum(import_v1038.ApplicationIntegrationType));
3505
+ var baseContextMenuCommandPredicate = import_zod8.z.object({
3393
3506
  contexts: contextsPredicate.optional(),
3394
3507
  default_member_permissions: memberPermissionsPredicate.optional(),
3395
3508
  name: namePredicate2,
3396
3509
  name_localizations: localeMapPredicate.optional(),
3397
3510
  integration_types: integrationTypesPredicate.optional(),
3398
- nsfw: import_zod7.z.boolean().optional()
3511
+ nsfw: import_zod8.z.boolean().optional()
3399
3512
  });
3400
3513
  var userCommandPredicate = baseContextMenuCommandPredicate.extend({
3401
- type: import_zod7.z.literal(import_v1036.ApplicationCommandType.User)
3514
+ type: import_zod8.z.literal(import_v1038.ApplicationCommandType.User)
3402
3515
  });
3403
3516
  var messageCommandPredicate = baseContextMenuCommandPredicate.extend({
3404
- type: import_zod7.z.literal(import_v1036.ApplicationCommandType.Message)
3517
+ type: import_zod8.z.literal(import_v1038.ApplicationCommandType.Message)
3405
3518
  });
3406
3519
 
3407
3520
  // src/interactions/commands/contextMenu/ContextMenuCommand.ts
@@ -3431,7 +3544,7 @@ var ContextMenuCommandBuilder = class extends (0, import_ts_mixer9.Mixin)(
3431
3544
  };
3432
3545
 
3433
3546
  // src/interactions/commands/contextMenu/MessageCommand.ts
3434
- var import_v1037 = require("discord-api-types/v10");
3547
+ var import_v1039 = require("discord-api-types/v10");
3435
3548
  var MessageContextCommandBuilder = class extends ContextMenuCommandBuilder {
3436
3549
  static {
3437
3550
  __name(this, "MessageContextCommandBuilder");
@@ -3440,14 +3553,14 @@ var MessageContextCommandBuilder = class extends ContextMenuCommandBuilder {
3440
3553
  * {@inheritDoc CommandBuilder.toJSON}
3441
3554
  */
3442
3555
  toJSON(validationOverride) {
3443
- const data = { ...structuredClone(this.data), type: import_v1037.ApplicationCommandType.Message };
3556
+ const data = { ...structuredClone(this.data), type: import_v1039.ApplicationCommandType.Message };
3444
3557
  validate(messageCommandPredicate, data, validationOverride);
3445
3558
  return data;
3446
3559
  }
3447
3560
  };
3448
3561
 
3449
3562
  // src/interactions/commands/contextMenu/UserCommand.ts
3450
- var import_v1038 = require("discord-api-types/v10");
3563
+ var import_v1040 = require("discord-api-types/v10");
3451
3564
  var UserContextCommandBuilder = class extends ContextMenuCommandBuilder {
3452
3565
  static {
3453
3566
  __name(this, "UserContextCommandBuilder");
@@ -3456,23 +3569,26 @@ var UserContextCommandBuilder = class extends ContextMenuCommandBuilder {
3456
3569
  * {@inheritDoc CommandBuilder.toJSON}
3457
3570
  */
3458
3571
  toJSON(validationOverride) {
3459
- const data = { ...structuredClone(this.data), type: import_v1038.ApplicationCommandType.User };
3572
+ const data = { ...structuredClone(this.data), type: import_v1040.ApplicationCommandType.User };
3460
3573
  validate(userCommandPredicate, data, validationOverride);
3461
3574
  return data;
3462
3575
  }
3463
3576
  };
3464
3577
 
3465
3578
  // src/interactions/modals/Assertions.ts
3466
- var import_v1039 = require("discord-api-types/v10");
3467
- var import_zod8 = require("zod");
3468
- var titlePredicate = import_zod8.z.string().min(1).max(45);
3469
- var modalPredicate = import_zod8.z.object({
3579
+ var import_v1041 = require("discord-api-types/v10");
3580
+ var import_zod9 = require("zod");
3581
+ var titlePredicate = import_zod9.z.string().min(1).max(45);
3582
+ var modalPredicate = import_zod9.z.object({
3470
3583
  title: titlePredicate,
3471
3584
  custom_id: customIdPredicate,
3472
- components: import_zod8.z.object({
3473
- type: import_zod8.z.literal(import_v1039.ComponentType.ActionRow),
3474
- components: import_zod8.z.object({ type: import_zod8.z.literal(import_v1039.ComponentType.TextInput) }).array().length(1)
3475
- }).array().min(1).max(5)
3585
+ components: import_zod9.z.union([
3586
+ import_zod9.z.object({
3587
+ type: import_zod9.z.literal(import_v1041.ComponentType.ActionRow),
3588
+ components: import_zod9.z.object({ type: import_zod9.z.literal(import_v1041.ComponentType.TextInput) }).array().length(1)
3589
+ }),
3590
+ labelPredicate2
3591
+ ]).array().min(1).max(5)
3476
3592
  });
3477
3593
 
3478
3594
  // src/interactions/modals/Modal.ts
@@ -3499,7 +3615,6 @@ var ModalBuilder = class {
3499
3615
  const { components = [], ...rest } = data;
3500
3616
  this.data = {
3501
3617
  ...structuredClone(rest),
3502
- // @ts-expect-error https://github.com/discordjs/discord.js/pull/11034
3503
3618
  components: components.map((component) => createComponentBuilder(component))
3504
3619
  };
3505
3620
  }
@@ -3522,57 +3637,57 @@ var ModalBuilder = class {
3522
3637
  return this;
3523
3638
  }
3524
3639
  /**
3525
- * Adds action rows to this modal.
3640
+ * Adds label components to this modal.
3526
3641
  *
3527
3642
  * @param components - The components to add
3528
3643
  */
3529
- addActionRows(...components) {
3644
+ addLabelComponents(...components) {
3530
3645
  const normalized = normalizeArray(components);
3531
- const resolved = normalized.map((row) => resolveBuilder(row, ActionRowBuilder));
3646
+ const resolved = normalized.map((label) => resolveBuilder(label, LabelBuilder));
3532
3647
  this.data.components.push(...resolved);
3533
3648
  return this;
3534
3649
  }
3535
3650
  /**
3536
- * Sets the action rows for this modal.
3651
+ * Sets the labels for this modal.
3537
3652
  *
3538
3653
  * @param components - The components to set
3539
3654
  */
3540
- setActionRows(...components) {
3655
+ setLabelComponents(...components) {
3541
3656
  const normalized = normalizeArray(components);
3542
- this.spliceActionRows(0, this.data.components.length, ...normalized);
3657
+ this.spliceLabelComponents(0, this.data.components.length, ...normalized);
3543
3658
  return this;
3544
3659
  }
3545
3660
  /**
3546
- * Removes, replaces, or inserts action rows for this modal.
3661
+ * Removes, replaces, or inserts labels for this modal.
3547
3662
  *
3548
3663
  * @remarks
3549
3664
  * This method behaves similarly
3550
3665
  * to {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
3551
- * The maximum amount of action rows that can be added is 5.
3666
+ * The maximum amount of labels that can be added is 5.
3552
3667
  *
3553
- * It's useful for modifying and adjusting order of the already-existing action rows of a modal.
3668
+ * It's useful for modifying and adjusting order of the already-existing labels of a modal.
3554
3669
  * @example
3555
- * Remove the first action row:
3670
+ * Remove the first label:
3556
3671
  * ```ts
3557
- * embed.spliceActionRows(0, 1);
3672
+ * modal.spliceLabelComponents(0, 1);
3558
3673
  * ```
3559
3674
  * @example
3560
- * Remove the first n action rows:
3675
+ * Remove the first n labels:
3561
3676
  * ```ts
3562
3677
  * const n = 4;
3563
- * embed.spliceActionRows(0, n);
3678
+ * modal.spliceLabelComponents(0, n);
3564
3679
  * ```
3565
3680
  * @example
3566
- * Remove the last action row:
3681
+ * Remove the last label:
3567
3682
  * ```ts
3568
- * embed.spliceActionRows(-1, 1);
3683
+ * modal.spliceLabelComponents(-1, 1);
3569
3684
  * ```
3570
3685
  * @param index - The index to start at
3571
- * @param deleteCount - The number of action rows to remove
3572
- * @param rows - The replacing action row objects
3686
+ * @param deleteCount - The number of labels to remove
3687
+ * @param labels - The replacing label objects
3573
3688
  */
3574
- spliceActionRows(index, deleteCount, ...rows) {
3575
- const resolved = rows.map((row) => resolveBuilder(row, ActionRowBuilder));
3689
+ spliceLabelComponents(index, deleteCount, ...labels) {
3690
+ const resolved = labels.map((label) => resolveBuilder(label, LabelBuilder));
3576
3691
  this.data.components.splice(index, deleteCount, ...resolved);
3577
3692
  return this;
3578
3693
  }
@@ -3595,7 +3710,7 @@ var ModalBuilder = class {
3595
3710
  };
3596
3711
 
3597
3712
  // src/messages/embed/Assertions.ts
3598
- var import_zod9 = require("zod");
3713
+ var import_zod10 = require("zod");
3599
3714
 
3600
3715
  // src/util/componentUtil.ts
3601
3716
  function embedLength(data) {
@@ -3604,34 +3719,34 @@ function embedLength(data) {
3604
3719
  __name(embedLength, "embedLength");
3605
3720
 
3606
3721
  // src/messages/embed/Assertions.ts
3607
- var namePredicate3 = import_zod9.z.string().max(256);
3608
- var URLPredicate = import_zod9.z.url({ protocol: /^https?$/ });
3609
- var URLWithAttachmentProtocolPredicate = import_zod9.z.url({ protocol: /^(?:https?|attachment)$/ });
3610
- var embedFieldPredicate = import_zod9.z.object({
3722
+ var namePredicate3 = import_zod10.z.string().max(256);
3723
+ var URLPredicate = import_zod10.z.url({ protocol: /^https?$/ });
3724
+ var URLWithAttachmentProtocolPredicate = import_zod10.z.url({ protocol: /^(?:https?|attachment)$/ });
3725
+ var embedFieldPredicate = import_zod10.z.object({
3611
3726
  name: namePredicate3,
3612
- value: import_zod9.z.string().max(1024),
3613
- inline: import_zod9.z.boolean().optional()
3727
+ value: import_zod10.z.string().max(1024),
3728
+ inline: import_zod10.z.boolean().optional()
3614
3729
  });
3615
- var embedAuthorPredicate = import_zod9.z.object({
3730
+ var embedAuthorPredicate = import_zod10.z.object({
3616
3731
  name: namePredicate3.min(1),
3617
3732
  icon_url: URLWithAttachmentProtocolPredicate.optional(),
3618
3733
  url: URLPredicate.optional()
3619
3734
  });
3620
- var embedFooterPredicate = import_zod9.z.object({
3621
- text: import_zod9.z.string().min(1).max(2048),
3735
+ var embedFooterPredicate = import_zod10.z.object({
3736
+ text: import_zod10.z.string().min(1).max(2048),
3622
3737
  icon_url: URLWithAttachmentProtocolPredicate.optional()
3623
3738
  });
3624
- var embedPredicate = import_zod9.z.object({
3739
+ var embedPredicate = import_zod10.z.object({
3625
3740
  title: namePredicate3.min(1).optional(),
3626
- description: import_zod9.z.string().min(1).max(4096).optional(),
3741
+ description: import_zod10.z.string().min(1).max(4096).optional(),
3627
3742
  url: URLPredicate.optional(),
3628
- timestamp: import_zod9.z.string().optional(),
3629
- color: import_zod9.z.int().min(0).max(16777215).optional(),
3743
+ timestamp: import_zod10.z.string().optional(),
3744
+ color: import_zod10.z.int().min(0).max(16777215).optional(),
3630
3745
  footer: embedFooterPredicate.optional(),
3631
- image: import_zod9.z.object({ url: URLWithAttachmentProtocolPredicate }).optional(),
3632
- thumbnail: import_zod9.z.object({ url: URLWithAttachmentProtocolPredicate }).optional(),
3746
+ image: import_zod10.z.object({ url: URLWithAttachmentProtocolPredicate }).optional(),
3747
+ thumbnail: import_zod10.z.object({ url: URLWithAttachmentProtocolPredicate }).optional(),
3633
3748
  author: embedAuthorPredicate.optional(),
3634
- fields: import_zod9.z.array(embedFieldPredicate).max(25).optional()
3749
+ fields: import_zod10.z.array(embedFieldPredicate).max(25).optional()
3635
3750
  }).refine(
3636
3751
  (embed) => embed.title !== void 0 || embed.description !== void 0 || embed.fields !== void 0 && embed.fields.length > 0 || embed.footer !== void 0 || embed.author !== void 0 || embed.image !== void 0 || embed.thumbnail !== void 0,
3637
3752
  {
@@ -4116,20 +4231,20 @@ var EmbedBuilder = class {
4116
4231
  };
4117
4232
 
4118
4233
  // src/messages/poll/Assertions.ts
4119
- var import_v1040 = require("discord-api-types/v10");
4120
- var import_zod10 = require("zod");
4121
- var pollQuestionPredicate = import_zod10.z.object({ text: import_zod10.z.string().min(1).max(300) });
4122
- var pollAnswerMediaPredicate = import_zod10.z.object({
4123
- text: import_zod10.z.string().min(1).max(55),
4234
+ var import_v1042 = require("discord-api-types/v10");
4235
+ var import_zod11 = require("zod");
4236
+ var pollQuestionPredicate = import_zod11.z.object({ text: import_zod11.z.string().min(1).max(300) });
4237
+ var pollAnswerMediaPredicate = import_zod11.z.object({
4238
+ text: import_zod11.z.string().min(1).max(55),
4124
4239
  emoji: emojiPredicate.optional()
4125
4240
  });
4126
- var pollAnswerPredicate = import_zod10.z.object({ poll_media: pollAnswerMediaPredicate });
4127
- var pollPredicate = import_zod10.z.object({
4241
+ var pollAnswerPredicate = import_zod11.z.object({ poll_media: pollAnswerMediaPredicate });
4242
+ var pollPredicate = import_zod11.z.object({
4128
4243
  question: pollQuestionPredicate,
4129
- answers: import_zod10.z.array(pollAnswerPredicate).min(1).max(10),
4130
- duration: import_zod10.z.number().min(1).max(768).optional(),
4131
- allow_multiselect: import_zod10.z.boolean().optional(),
4132
- layout_type: import_zod10.z.enum(import_v1040.PollLayoutType).optional()
4244
+ answers: import_zod11.z.array(pollAnswerPredicate).min(1).max(10),
4245
+ duration: import_zod11.z.number().min(1).max(768).optional(),
4246
+ allow_multiselect: import_zod11.z.boolean().optional(),
4247
+ layout_type: import_zod11.z.enum(import_v1042.PollLayoutType).optional()
4133
4248
  });
4134
4249
 
4135
4250
  // src/messages/poll/PollMedia.ts
@@ -4458,95 +4573,95 @@ var PollBuilder = class {
4458
4573
  };
4459
4574
 
4460
4575
  // src/messages/Assertions.ts
4461
- var import_v1041 = require("discord-api-types/v10");
4462
- var import_zod11 = require("zod");
4463
- var attachmentPredicate = import_zod11.z.object({
4464
- id: import_zod11.z.union([import_zod11.z.string(), import_zod11.z.number()]),
4465
- description: import_zod11.z.string().max(1024).optional(),
4466
- duration_secs: import_zod11.z.number().max(2 ** 31 - 1).optional(),
4467
- filename: import_zod11.z.string().max(1024).optional(),
4468
- title: import_zod11.z.string().max(1024).optional(),
4469
- waveform: import_zod11.z.string().max(400).optional()
4576
+ var import_v1043 = require("discord-api-types/v10");
4577
+ var import_zod12 = require("zod");
4578
+ var attachmentPredicate = import_zod12.z.object({
4579
+ id: import_zod12.z.union([import_zod12.z.string(), import_zod12.z.number()]),
4580
+ description: import_zod12.z.string().max(1024).optional(),
4581
+ duration_secs: import_zod12.z.number().max(2 ** 31 - 1).optional(),
4582
+ filename: import_zod12.z.string().max(1024).optional(),
4583
+ title: import_zod12.z.string().max(1024).optional(),
4584
+ waveform: import_zod12.z.string().max(400).optional()
4470
4585
  });
4471
- var allowedMentionPredicate = import_zod11.z.object({
4472
- parse: import_zod11.z.enum(import_v1041.AllowedMentionsTypes).array().optional(),
4473
- roles: import_zod11.z.string().array().max(100).optional(),
4474
- users: import_zod11.z.string().array().max(100).optional(),
4475
- replied_user: import_zod11.z.boolean().optional()
4586
+ var allowedMentionPredicate = import_zod12.z.object({
4587
+ parse: import_zod12.z.enum(import_v1043.AllowedMentionsTypes).array().optional(),
4588
+ roles: import_zod12.z.string().array().max(100).optional(),
4589
+ users: import_zod12.z.string().array().max(100).optional(),
4590
+ replied_user: import_zod12.z.boolean().optional()
4476
4591
  }).refine(
4477
- (data) => !(data.parse?.includes(import_v1041.AllowedMentionsTypes.User) && data.users?.length || data.parse?.includes(import_v1041.AllowedMentionsTypes.Role) && data.roles?.length),
4592
+ (data) => !(data.parse?.includes(import_v1043.AllowedMentionsTypes.User) && data.users?.length || data.parse?.includes(import_v1043.AllowedMentionsTypes.Role) && data.roles?.length),
4478
4593
  {
4479
4594
  error: 'Cannot specify both parse: ["users"] and non-empty users array, or parse: ["roles"] and non-empty roles array. These are mutually exclusive'
4480
4595
  }
4481
4596
  );
4482
- var messageReferencePredicate = import_zod11.z.object({
4483
- channel_id: import_zod11.z.string().optional(),
4484
- fail_if_not_exists: import_zod11.z.boolean().optional(),
4485
- guild_id: import_zod11.z.string().optional(),
4486
- message_id: import_zod11.z.string(),
4487
- type: import_zod11.z.enum(import_v1041.MessageReferenceType).optional()
4597
+ var messageReferencePredicate = import_zod12.z.object({
4598
+ channel_id: import_zod12.z.string().optional(),
4599
+ fail_if_not_exists: import_zod12.z.boolean().optional(),
4600
+ guild_id: import_zod12.z.string().optional(),
4601
+ message_id: import_zod12.z.string(),
4602
+ type: import_zod12.z.enum(import_v1043.MessageReferenceType).optional()
4488
4603
  });
4489
- var baseMessagePredicate = import_zod11.z.object({
4490
- nonce: import_zod11.z.union([import_zod11.z.string().max(25), import_zod11.z.number()]).optional(),
4491
- tts: import_zod11.z.boolean().optional(),
4604
+ var baseMessagePredicate = import_zod12.z.object({
4605
+ nonce: import_zod12.z.union([import_zod12.z.string().max(25), import_zod12.z.number()]).optional(),
4606
+ tts: import_zod12.z.boolean().optional(),
4492
4607
  allowed_mentions: allowedMentionPredicate.optional(),
4493
4608
  message_reference: messageReferencePredicate.optional(),
4494
4609
  attachments: attachmentPredicate.array().max(10).optional(),
4495
- enforce_nonce: import_zod11.z.boolean().optional()
4610
+ enforce_nonce: import_zod12.z.boolean().optional()
4496
4611
  });
4497
- var basicActionRowPredicate = import_zod11.z.object({
4498
- type: import_zod11.z.literal(import_v1041.ComponentType.ActionRow),
4499
- components: import_zod11.z.object({
4500
- type: import_zod11.z.literal([
4501
- import_v1041.ComponentType.Button,
4502
- import_v1041.ComponentType.ChannelSelect,
4503
- import_v1041.ComponentType.MentionableSelect,
4504
- import_v1041.ComponentType.RoleSelect,
4505
- import_v1041.ComponentType.StringSelect,
4506
- import_v1041.ComponentType.UserSelect
4612
+ var basicActionRowPredicate = import_zod12.z.object({
4613
+ type: import_zod12.z.literal(import_v1043.ComponentType.ActionRow),
4614
+ components: import_zod12.z.object({
4615
+ type: import_zod12.z.literal([
4616
+ import_v1043.ComponentType.Button,
4617
+ import_v1043.ComponentType.ChannelSelect,
4618
+ import_v1043.ComponentType.MentionableSelect,
4619
+ import_v1043.ComponentType.RoleSelect,
4620
+ import_v1043.ComponentType.StringSelect,
4621
+ import_v1043.ComponentType.UserSelect
4507
4622
  ])
4508
4623
  }).array()
4509
4624
  });
4510
4625
  var messageNoComponentsV2Predicate = baseMessagePredicate.extend({
4511
- content: import_zod11.z.string().max(2e3).optional(),
4626
+ content: import_zod12.z.string().max(2e3).optional(),
4512
4627
  embeds: embedPredicate.array().max(10).optional(),
4513
- sticker_ids: import_zod11.z.array(import_zod11.z.string()).max(3).optional(),
4628
+ sticker_ids: import_zod12.z.array(import_zod12.z.string()).max(3).optional(),
4514
4629
  poll: pollPredicate.optional(),
4515
4630
  components: basicActionRowPredicate.array().max(5).optional(),
4516
- flags: import_zod11.z.int().optional().refine((flags) => !flags || (flags & import_v1041.MessageFlags.IsComponentsV2) === 0, {
4631
+ flags: import_zod12.z.int().optional().refine((flags) => !flags || (flags & import_v1043.MessageFlags.IsComponentsV2) === 0, {
4517
4632
  error: "Cannot set content, embeds, stickers, or poll with IsComponentsV2 flag set"
4518
4633
  })
4519
4634
  }).refine(
4520
4635
  (data) => data.content !== void 0 || data.embeds !== void 0 && data.embeds.length > 0 || data.poll !== void 0 || data.attachments !== void 0 && data.attachments.length > 0 || data.components !== void 0 && data.components.length > 0 || data.sticker_ids !== void 0 && data.sticker_ids.length > 0,
4521
4636
  { error: "Messages must have content, embeds, a poll, attachments, components or stickers" }
4522
4637
  );
4523
- var allTopLevelComponentsPredicate = import_zod11.z.union([
4638
+ var allTopLevelComponentsPredicate = import_zod12.z.union([
4524
4639
  basicActionRowPredicate,
4525
- import_zod11.z.object({
4526
- type: import_zod11.z.literal([
4640
+ import_zod12.z.object({
4641
+ type: import_zod12.z.literal([
4527
4642
  // Components v2
4528
- import_v1041.ComponentType.Container,
4529
- import_v1041.ComponentType.File,
4530
- import_v1041.ComponentType.MediaGallery,
4531
- import_v1041.ComponentType.Section,
4532
- import_v1041.ComponentType.Separator,
4533
- import_v1041.ComponentType.TextDisplay,
4534
- import_v1041.ComponentType.Thumbnail
4643
+ import_v1043.ComponentType.Container,
4644
+ import_v1043.ComponentType.File,
4645
+ import_v1043.ComponentType.MediaGallery,
4646
+ import_v1043.ComponentType.Section,
4647
+ import_v1043.ComponentType.Separator,
4648
+ import_v1043.ComponentType.TextDisplay,
4649
+ import_v1043.ComponentType.Thumbnail
4535
4650
  ])
4536
4651
  })
4537
4652
  ]).array().min(1).max(10);
4538
4653
  var messageComponentsV2Predicate = baseMessagePredicate.extend({
4539
4654
  components: allTopLevelComponentsPredicate,
4540
- flags: import_zod11.z.int().refine((flags) => (flags & import_v1041.MessageFlags.IsComponentsV2) === import_v1041.MessageFlags.IsComponentsV2, {
4655
+ flags: import_zod12.z.int().refine((flags) => (flags & import_v1043.MessageFlags.IsComponentsV2) === import_v1043.MessageFlags.IsComponentsV2, {
4541
4656
  error: "Must set IsComponentsV2 flag to use Components V2"
4542
4657
  }),
4543
4658
  // These fields cannot be set
4544
- content: import_zod11.z.string().length(0).nullish(),
4545
- embeds: import_zod11.z.array(import_zod11.z.never()).nullish(),
4546
- sticker_ids: import_zod11.z.array(import_zod11.z.never()).nullish(),
4547
- poll: import_zod11.z.null().optional()
4659
+ content: import_zod12.z.string().length(0).nullish(),
4660
+ embeds: import_zod12.z.array(import_zod12.z.never()).nullish(),
4661
+ sticker_ids: import_zod12.z.array(import_zod12.z.never()).nullish(),
4662
+ poll: import_zod12.z.null().optional()
4548
4663
  });
4549
- var messagePredicate = import_zod11.z.union([messageNoComponentsV2Predicate, messageComponentsV2Predicate]);
4664
+ var messagePredicate = import_zod12.z.union([messageNoComponentsV2Predicate, messageComponentsV2Predicate]);
4550
4665
 
4551
4666
  // src/messages/AllowedMentions.ts
4552
4667
  var AllowedMentionsBuilder = class {
@@ -5436,7 +5551,7 @@ var MessageBuilder = class {
5436
5551
  };
5437
5552
 
5438
5553
  // src/index.ts
5439
- var version = "2.0.0-dev.1757073695-ddf9f818e";
5554
+ var version = "2.0.0-dev.1757160090-352c9819b";
5440
5555
  // Annotate the CommonJS export names for ESM import in node:
5441
5556
  0 && (module.exports = {
5442
5557
  ActionRowBuilder,
@@ -5475,6 +5590,7 @@ var version = "2.0.0-dev.1757073695-ddf9f818e";
5475
5590
  EmbedFooterBuilder,
5476
5591
  EmojiOrLabelButtonMixin,
5477
5592
  FileBuilder,
5593
+ LabelBuilder,
5478
5594
  LinkButtonBuilder,
5479
5595
  MediaGalleryBuilder,
5480
5596
  MediaGalleryItemBuilder,
@@ -5530,6 +5646,7 @@ var version = "2.0.0-dev.1757073695-ddf9f818e";
5530
5646
  filePredicate,
5531
5647
  integerOptionPredicate,
5532
5648
  isValidationEnabled,
5649
+ labelPredicate,
5533
5650
  localeMapPredicate,
5534
5651
  mediaGalleryItemPredicate,
5535
5652
  mediaGalleryPredicate,