commandkit 0.1.11-dev.20250422144359 → 0.1.11-dev.20250426143847

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
@@ -128,7 +128,7 @@ var init_MemoryCache = __esm({
128
128
  }
129
129
  });
130
130
 
131
- // src/components/action-row/ActionRow.ts
131
+ // src/components/v1/action-row/ActionRow.ts
132
132
  function ActionRow(props) {
133
133
  const row = new import_discord.ActionRowBuilder();
134
134
  if (Array.isArray(props.children)) {
@@ -140,7 +140,7 @@ function ActionRow(props) {
140
140
  }
141
141
  var import_discord;
142
142
  var init_ActionRow = __esm({
143
- "src/components/action-row/ActionRow.ts"() {
143
+ "src/components/v1/action-row/ActionRow.ts"() {
144
144
  "use strict";
145
145
  init_cjs_shims();
146
146
  import_discord = require("discord.js");
@@ -206,10 +206,12 @@ function makeContextAwareFunction(env, fn, finalizer) {
206
206
  }
207
207
  } finally {
208
208
  if (typeof finalizer === "function") {
209
- try {
210
- await finalizer(...args);
211
- } catch {
212
- }
209
+ setImmediate(async () => {
210
+ try {
211
+ await finalizer(...args);
212
+ } catch {
213
+ }
214
+ });
213
215
  }
214
216
  }
215
217
  });
@@ -255,10 +257,10 @@ var init_async_context = __esm({
255
257
  }
256
258
  });
257
259
 
258
- // src/components/button/ButtonKit.ts
260
+ // src/components/v1/button/ButtonKit.ts
259
261
  var import_discord2, _onClickHandler, _contextData, _unsub, _ButtonKit_instances, getEventInterceptor_fn, setupInteractionCollector_fn, destroyCollector_fn, _ButtonKit, ButtonKit;
260
262
  var init_ButtonKit = __esm({
261
- "src/components/button/ButtonKit.ts"() {
263
+ "src/components/v1/button/ButtonKit.ts"() {
262
264
  "use strict";
263
265
  init_cjs_shims();
264
266
  import_discord2 = require("discord.js");
@@ -421,7 +423,7 @@ var init_ButtonKit = __esm({
421
423
  }
422
424
  });
423
425
 
424
- // src/components/button/Button.ts
426
+ // src/components/v1/button/Button.ts
425
427
  function Button(props) {
426
428
  const button = new ButtonKit();
427
429
  props.style ??= import_discord3.ButtonStyle.Primary;
@@ -465,7 +467,7 @@ function Button(props) {
465
467
  }
466
468
  var import_discord3;
467
469
  var init_Button = __esm({
468
- "src/components/button/Button.ts"() {
470
+ "src/components/v1/button/Button.ts"() {
469
471
  "use strict";
470
472
  init_cjs_shims();
471
473
  import_discord3 = require("discord.js");
@@ -474,10 +476,10 @@ var init_Button = __esm({
474
476
  }
475
477
  });
476
478
 
477
- // src/components/modal/ModalKit.ts
479
+ // src/components/v1/modal/ModalKit.ts
478
480
  var import_discord4, _onSubmitHandler, _contextData2, _unsub2, _ModalKit_instances, getEventInterceptor_fn2, setupCollector_fn, destroyCollector_fn2, _ModalKit, ModalKit;
479
481
  var init_ModalKit = __esm({
480
- "src/components/modal/ModalKit.ts"() {
482
+ "src/components/v1/modal/ModalKit.ts"() {
481
483
  "use strict";
482
484
  init_cjs_shims();
483
485
  import_discord4 = require("discord.js");
@@ -631,7 +633,7 @@ var init_ModalKit = __esm({
631
633
  }
632
634
  });
633
635
 
634
- // src/components/modal/Modal.ts
636
+ // src/components/v1/modal/Modal.ts
635
637
  function Modal(props) {
636
638
  const modal = new ModalKit();
637
639
  if (props.title) {
@@ -695,7 +697,7 @@ function ParagraphInput(props) {
695
697
  }
696
698
  var import_discord5;
697
699
  var init_Modal = __esm({
698
- "src/components/modal/Modal.ts"() {
700
+ "src/components/v1/modal/Modal.ts"() {
699
701
  "use strict";
700
702
  init_cjs_shims();
701
703
  import_discord5 = require("discord.js");
@@ -707,10 +709,10 @@ var init_Modal = __esm({
707
709
  }
708
710
  });
709
711
 
710
- // src/components/select-menu/StringSelectMenuKit.ts
712
+ // src/components/v1/select-menu/StringSelectMenuKit.ts
711
713
  var import_discord6, _onSelectHandler, _contextData3, _unsub3, _StringSelectMenuKit_instances, getEventInterceptor_fn3, setupCollector_fn2, destroyCollector_fn3, _StringSelectMenuKit, StringSelectMenuKit;
712
714
  var init_StringSelectMenuKit = __esm({
713
- "src/components/select-menu/StringSelectMenuKit.ts"() {
715
+ "src/components/v1/select-menu/StringSelectMenuKit.ts"() {
714
716
  "use strict";
715
717
  init_cjs_shims();
716
718
  import_discord6 = require("discord.js");
@@ -864,10 +866,10 @@ var init_StringSelectMenuKit = __esm({
864
866
  }
865
867
  });
866
868
 
867
- // src/components/select-menu/ChannelSelectMenuKit.ts
869
+ // src/components/v1/select-menu/ChannelSelectMenuKit.ts
868
870
  var import_discord7, _onSelectHandler2, _contextData4, _unsub4, _ChannelSelectMenuKit_instances, getEventInterceptor_fn4, setupCollector_fn3, destroyCollector_fn4, _ChannelSelectMenuKit, ChannelSelectMenuKit;
869
871
  var init_ChannelSelectMenuKit = __esm({
870
- "src/components/select-menu/ChannelSelectMenuKit.ts"() {
872
+ "src/components/v1/select-menu/ChannelSelectMenuKit.ts"() {
871
873
  "use strict";
872
874
  init_cjs_shims();
873
875
  import_discord7 = require("discord.js");
@@ -1021,10 +1023,10 @@ var init_ChannelSelectMenuKit = __esm({
1021
1023
  }
1022
1024
  });
1023
1025
 
1024
- // src/components/select-menu/MentionableSelectMenuKit.ts
1026
+ // src/components/v1/select-menu/MentionableSelectMenuKit.ts
1025
1027
  var import_discord8, _onSelectHandler3, _contextData5, _unsub5, _MentionableSelectMenuKit_instances, getEventInterceptor_fn5, setupCollector_fn4, destroyCollector_fn5, _MentionableSelectMenuKit, MentionableSelectMenuKit;
1026
1028
  var init_MentionableSelectMenuKit = __esm({
1027
- "src/components/select-menu/MentionableSelectMenuKit.ts"() {
1029
+ "src/components/v1/select-menu/MentionableSelectMenuKit.ts"() {
1028
1030
  "use strict";
1029
1031
  init_cjs_shims();
1030
1032
  import_discord8 = require("discord.js");
@@ -1178,10 +1180,10 @@ var init_MentionableSelectMenuKit = __esm({
1178
1180
  }
1179
1181
  });
1180
1182
 
1181
- // src/components/select-menu/UserSelectMenuKit.ts
1183
+ // src/components/v1/select-menu/UserSelectMenuKit.ts
1182
1184
  var import_discord9, _onSelectHandler4, _contextData6, _unsub6, _UserSelectMenuKit_instances, getEventInterceptor_fn6, setupCollector_fn5, destroyCollector_fn6, _UserSelectMenuKit, UserSelectMenuKit;
1183
1185
  var init_UserSelectMenuKit = __esm({
1184
- "src/components/select-menu/UserSelectMenuKit.ts"() {
1186
+ "src/components/v1/select-menu/UserSelectMenuKit.ts"() {
1185
1187
  "use strict";
1186
1188
  init_cjs_shims();
1187
1189
  import_discord9 = require("discord.js");
@@ -1335,10 +1337,10 @@ var init_UserSelectMenuKit = __esm({
1335
1337
  }
1336
1338
  });
1337
1339
 
1338
- // src/components/select-menu/RoleSelectMenuKit.ts
1340
+ // src/components/v1/select-menu/RoleSelectMenuKit.ts
1339
1341
  var import_discord10, _onSelectHandler5, _contextData7, _unsub7, _RoleSelectMenuKit_instances, getEventInterceptor_fn7, setupCollector_fn6, destroyCollector_fn7, _RoleSelectMenuKit, RoleSelectMenuKit;
1340
1342
  var init_RoleSelectMenuKit = __esm({
1341
- "src/components/select-menu/RoleSelectMenuKit.ts"() {
1343
+ "src/components/v1/select-menu/RoleSelectMenuKit.ts"() {
1342
1344
  "use strict";
1343
1345
  init_cjs_shims();
1344
1346
  import_discord10 = require("discord.js");
@@ -1492,7 +1494,7 @@ var init_RoleSelectMenuKit = __esm({
1492
1494
  }
1493
1495
  });
1494
1496
 
1495
- // src/components/select-menu/SelectMenu.ts
1497
+ // src/components/v1/select-menu/SelectMenu.ts
1496
1498
  function applyPropsToBuilder(builder, props) {
1497
1499
  builder.setCustomId(props.customId ?? `select-menu::${crypto.randomUUID()}`);
1498
1500
  if (props.maxValues != null) {
@@ -1582,7 +1584,7 @@ function ChannelSelectMenu(props) {
1582
1584
  }
1583
1585
  var import_discord11;
1584
1586
  var init_SelectMenu = __esm({
1585
- "src/components/select-menu/SelectMenu.ts"() {
1587
+ "src/components/v1/select-menu/SelectMenu.ts"() {
1586
1588
  "use strict";
1587
1589
  init_cjs_shims();
1588
1590
  import_discord11 = require("discord.js");
@@ -1601,11 +1603,195 @@ var init_SelectMenu = __esm({
1601
1603
  }
1602
1604
  });
1603
1605
 
1604
- // src/components/select-menu/common.ts
1606
+ // src/components/v1/select-menu/common.ts
1605
1607
  var init_common = __esm({
1606
- "src/components/select-menu/common.ts"() {
1608
+ "src/components/v1/select-menu/common.ts"() {
1609
+ "use strict";
1610
+ init_cjs_shims();
1611
+ }
1612
+ });
1613
+
1614
+ // src/components/v2/common.ts
1615
+ function applyId(props, component) {
1616
+ if (props.id != null) {
1617
+ component.setId(props.id);
1618
+ }
1619
+ }
1620
+ var init_common2 = __esm({
1621
+ "src/components/v2/common.ts"() {
1622
+ "use strict";
1623
+ init_cjs_shims();
1624
+ __name(applyId, "applyId");
1625
+ }
1626
+ });
1627
+
1628
+ // src/components/v2/container.ts
1629
+ function Container(props) {
1630
+ var _a;
1631
+ const container = new import_discord12.ContainerBuilder();
1632
+ applyId(props, container);
1633
+ if (typeof props.accentColor != null) {
1634
+ container.setAccentColor(props.accentColor);
1635
+ }
1636
+ if (props.spoiler != null) {
1637
+ container.setSpoiler(props.spoiler);
1638
+ }
1639
+ if ((_a = props.children) == null ? void 0 : _a.length) {
1640
+ for (const child of props.children.flat()) {
1641
+ if (child instanceof import_discord12.TextDisplayBuilder) {
1642
+ container.addTextDisplayComponents(child);
1643
+ }
1644
+ if (child instanceof import_discord12.FileBuilder) {
1645
+ container.addFileComponents(child);
1646
+ }
1647
+ if (child instanceof import_discord12.ActionRowBuilder) {
1648
+ container.addActionRowComponents(child);
1649
+ }
1650
+ if (child instanceof import_discord12.SeparatorBuilder) {
1651
+ container.addSeparatorComponents(child);
1652
+ }
1653
+ if (child instanceof import_discord12.SectionBuilder) {
1654
+ container.addSectionComponents(child);
1655
+ }
1656
+ if (child instanceof import_discord12.MediaGalleryBuilder) {
1657
+ container.addMediaGalleryComponents(child);
1658
+ }
1659
+ }
1660
+ }
1661
+ return container;
1662
+ }
1663
+ var import_discord12;
1664
+ var init_container = __esm({
1665
+ "src/components/v2/container.ts"() {
1666
+ "use strict";
1667
+ init_cjs_shims();
1668
+ import_discord12 = require("discord.js");
1669
+ init_common2();
1670
+ __name(Container, "Container");
1671
+ }
1672
+ });
1673
+
1674
+ // src/components/v2/file.ts
1675
+ function File(props) {
1676
+ const file = new import_discord13.FileBuilder(props);
1677
+ if (props.url != null) {
1678
+ file.setURL(props.url);
1679
+ }
1680
+ return file;
1681
+ }
1682
+ var import_discord13;
1683
+ var init_file = __esm({
1684
+ "src/components/v2/file.ts"() {
1685
+ "use strict";
1686
+ init_cjs_shims();
1687
+ import_discord13 = require("discord.js");
1688
+ __name(File, "File");
1689
+ }
1690
+ });
1691
+
1692
+ // src/components/v2/media-gallery.ts
1693
+ function MediaGallery(props) {
1694
+ const gallery = new import_discord14.MediaGalleryBuilder();
1695
+ applyId(props, gallery);
1696
+ if (props.children != null) {
1697
+ gallery.addItems(props.children.flat());
1698
+ }
1699
+ return gallery;
1700
+ }
1701
+ function MediaGalleryItem(props) {
1702
+ const item = new import_discord14.MediaGalleryItemBuilder();
1703
+ if (props.description != null) {
1704
+ item.setDescription(props.description);
1705
+ }
1706
+ if (props.spoiler != null) {
1707
+ item.setSpoiler(props.spoiler);
1708
+ }
1709
+ if (props.url != null) {
1710
+ item.setURL(props.url);
1711
+ }
1712
+ return item;
1713
+ }
1714
+ var import_discord14;
1715
+ var init_media_gallery = __esm({
1716
+ "src/components/v2/media-gallery.ts"() {
1717
+ "use strict";
1718
+ init_cjs_shims();
1719
+ import_discord14 = require("discord.js");
1720
+ init_common2();
1721
+ __name(MediaGallery, "MediaGallery");
1722
+ __name(MediaGalleryItem, "MediaGalleryItem");
1723
+ }
1724
+ });
1725
+
1726
+ // src/components/v2/section.ts
1727
+ function Section(props) {
1728
+ const section = new import_discord15.SectionBuilder();
1729
+ applyId(props, section);
1730
+ if (props.children != null) {
1731
+ for (const accessory of props.children.flat()) {
1732
+ if (accessory instanceof import_discord15.ThumbnailBuilder) {
1733
+ section.setThumbnailAccessory(accessory);
1734
+ } else if (accessory instanceof import_discord15.ButtonBuilder) {
1735
+ section.setButtonAccessory(accessory);
1736
+ } else if (accessory instanceof import_discord15.TextDisplayBuilder) {
1737
+ section.addTextDisplayComponents(accessory);
1738
+ }
1739
+ }
1740
+ }
1741
+ return section;
1742
+ }
1743
+ var import_discord15;
1744
+ var init_section = __esm({
1745
+ "src/components/v2/section.ts"() {
1746
+ "use strict";
1747
+ init_cjs_shims();
1748
+ import_discord15 = require("discord.js");
1749
+ init_common2();
1750
+ __name(Section, "Section");
1751
+ }
1752
+ });
1753
+
1754
+ // src/components/v2/separator.ts
1755
+ function Separator(props) {
1756
+ const separator = new import_discord16.SeparatorBuilder(props);
1757
+ return separator;
1758
+ }
1759
+ var import_discord16;
1760
+ var init_separator = __esm({
1761
+ "src/components/v2/separator.ts"() {
1762
+ "use strict";
1763
+ init_cjs_shims();
1764
+ import_discord16 = require("discord.js");
1765
+ __name(Separator, "Separator");
1766
+ }
1767
+ });
1768
+
1769
+ // src/components/v2/text-display.ts
1770
+ function TextDisplay(props) {
1771
+ const textDisplay = new import_discord17.TextDisplayBuilder(props);
1772
+ return textDisplay;
1773
+ }
1774
+ var import_discord17;
1775
+ var init_text_display = __esm({
1776
+ "src/components/v2/text-display.ts"() {
1607
1777
  "use strict";
1608
1778
  init_cjs_shims();
1779
+ import_discord17 = require("discord.js");
1780
+ __name(TextDisplay, "TextDisplay");
1781
+ }
1782
+ });
1783
+
1784
+ // src/components/v2/index.ts
1785
+ var init_v2 = __esm({
1786
+ "src/components/v2/index.ts"() {
1787
+ "use strict";
1788
+ init_cjs_shims();
1789
+ init_container();
1790
+ init_file();
1791
+ init_media_gallery();
1792
+ init_section();
1793
+ init_separator();
1794
+ init_text_display();
1609
1795
  }
1610
1796
  });
1611
1797
 
@@ -1865,6 +2051,7 @@ var init_components = __esm({
1865
2051
  init_RoleSelectMenuKit();
1866
2052
  init_SelectMenu();
1867
2053
  init_common();
2054
+ init_v2();
1868
2055
  init_element();
1869
2056
  init_types();
1870
2057
  init_EventInterceptor();
@@ -2267,19 +2454,19 @@ var init_Logger = __esm({
2267
2454
  });
2268
2455
 
2269
2456
  // src/plugins/plugin-runtime/CommandKitPluginRuntime.ts
2270
- var import_discord12, _CommandKitPluginRuntime, CommandKitPluginRuntime;
2457
+ var import_discord18, _CommandKitPluginRuntime, CommandKitPluginRuntime;
2271
2458
  var init_CommandKitPluginRuntime = __esm({
2272
2459
  "src/plugins/plugin-runtime/CommandKitPluginRuntime.ts"() {
2273
2460
  "use strict";
2274
2461
  init_cjs_shims();
2275
- import_discord12 = require("discord.js");
2462
+ import_discord18 = require("discord.js");
2276
2463
  init_error_codes();
2277
2464
  init_Logger();
2278
2465
  _CommandKitPluginRuntime = class _CommandKitPluginRuntime {
2279
2466
  constructor(commandkit2) {
2280
2467
  this.commandkit = commandkit2;
2281
2468
  }
2282
- plugins = new import_discord12.Collection();
2469
+ plugins = new import_discord18.Collection();
2283
2470
  getPlugin(pluginName) {
2284
2471
  return this.plugins.get(pluginName) ?? null;
2285
2472
  }
@@ -2854,12 +3041,12 @@ var init_resolve_file_url = __esm({
2854
3041
  });
2855
3042
 
2856
3043
  // src/app/commands/MessageCommandParser.ts
2857
- var import_discord13, _parsed, _options, _args, _MessageCommandParser, MessageCommandParser, _MessageCommandOptions, MessageCommandOptions;
3044
+ var import_discord19, _parsed, _options, _args, _MessageCommandParser, MessageCommandParser, _MessageCommandOptions, MessageCommandOptions;
2858
3045
  var init_MessageCommandParser = __esm({
2859
3046
  "src/app/commands/MessageCommandParser.ts"() {
2860
3047
  "use strict";
2861
3048
  init_cjs_shims();
2862
- import_discord13 = require("discord.js");
3049
+ import_discord19 = require("discord.js");
2863
3050
  init_error_codes();
2864
3051
  _MessageCommandParser = class _MessageCommandParser {
2865
3052
  constructor(message, prefix, schema) {
@@ -2934,36 +3121,36 @@ var init_MessageCommandParser = __esm({
2934
3121
  const [name, value] = part.split(":");
2935
3122
  if (!(name in schema)) return null;
2936
3123
  switch (schema[name]) {
2937
- case import_discord13.ApplicationCommandOptionType.Boolean:
3124
+ case import_discord19.ApplicationCommandOptionType.Boolean:
2938
3125
  return { name, value: value === "true" };
2939
- case import_discord13.ApplicationCommandOptionType.Integer:
3126
+ case import_discord19.ApplicationCommandOptionType.Integer:
2940
3127
  return { name, value: parseInt(value, 10) };
2941
- case import_discord13.ApplicationCommandOptionType.Number:
3128
+ case import_discord19.ApplicationCommandOptionType.Number:
2942
3129
  return { name, value: parseFloat(value) };
2943
- case import_discord13.ApplicationCommandOptionType.String:
3130
+ case import_discord19.ApplicationCommandOptionType.String:
2944
3131
  return { name, value };
2945
- case import_discord13.ApplicationCommandOptionType.User:
3132
+ case import_discord19.ApplicationCommandOptionType.User:
2946
3133
  return {
2947
3134
  name,
2948
3135
  value: this.message.mentions.users.find((u) => {
2949
3136
  return u.id === value.replace(/[<@!>]/g, "");
2950
3137
  })
2951
3138
  };
2952
- case import_discord13.ApplicationCommandOptionType.Channel:
3139
+ case import_discord19.ApplicationCommandOptionType.Channel:
2953
3140
  return {
2954
3141
  name,
2955
3142
  value: this.message.mentions.channels.find((c) => {
2956
3143
  return c.id === value.replace(/[<#>]/g, "");
2957
3144
  })
2958
3145
  };
2959
- case import_discord13.ApplicationCommandOptionType.Role:
3146
+ case import_discord19.ApplicationCommandOptionType.Role:
2960
3147
  return {
2961
3148
  name,
2962
3149
  value: this.message.mentions.roles.find((r) => {
2963
3150
  return r.id === value.replace(/[<@&>]/g, "");
2964
3151
  })
2965
3152
  };
2966
- case import_discord13.ApplicationCommandOptionType.Attachment:
3153
+ case import_discord19.ApplicationCommandOptionType.Attachment:
2967
3154
  return {
2968
3155
  name,
2969
3156
  value: this.message.attachments.find((a) => {
@@ -3037,7 +3224,7 @@ var init_MessageCommandParser = __esm({
3037
3224
  }
3038
3225
  getMentionable(name, required = false) {
3039
3226
  const target = this.assertOption(name, required);
3040
- if (target instanceof import_discord13.GuildMember || target instanceof import_discord13.User || target instanceof import_discord13.Role) {
3227
+ if (target instanceof import_discord19.GuildMember || target instanceof import_discord19.User || target instanceof import_discord19.Role) {
3041
3228
  return target;
3042
3229
  }
3043
3230
  if (required) {
@@ -3066,12 +3253,12 @@ var init_MessageCommandParser = __esm({
3066
3253
  });
3067
3254
 
3068
3255
  // src/app/register/CommandRegistrar.ts
3069
- var import_discord14, _CommandRegistrar, CommandRegistrar;
3256
+ var import_discord20, _CommandRegistrar, CommandRegistrar;
3070
3257
  var init_CommandRegistrar = __esm({
3071
3258
  "src/app/register/CommandRegistrar.ts"() {
3072
3259
  "use strict";
3073
3260
  init_cjs_shims();
3074
- import_discord14 = require("discord.js");
3261
+ import_discord20 = require("discord.js");
3075
3262
  init_Logger();
3076
3263
  _CommandRegistrar = class _CommandRegistrar {
3077
3264
  /**
@@ -3084,7 +3271,7 @@ var init_CommandRegistrar = __esm({
3084
3271
  this.commandkit.client.token ?? process.env.DISCORD_TOKEN ?? process.env.TOKEN ?? ""
3085
3272
  );
3086
3273
  }
3087
- api = new import_discord14.REST();
3274
+ api = new import_discord20.REST();
3088
3275
  /**
3089
3276
  * Gets the commands data.
3090
3277
  */
@@ -3094,20 +3281,20 @@ var init_CommandRegistrar = __esm({
3094
3281
  return commands.flatMap((cmd) => {
3095
3282
  const json = "toJSON" in cmd.data.command ? cmd.data.command.toJSON() : cmd.data.command;
3096
3283
  const collections = [json];
3097
- if (cmd.data.userContextMenu && json.type !== import_discord14.ApplicationCommandType.User) {
3284
+ if (cmd.data.userContextMenu && json.type !== import_discord20.ApplicationCommandType.User) {
3098
3285
  collections.push({
3099
3286
  ...json,
3100
- type: import_discord14.ApplicationCommandType.User,
3287
+ type: import_discord20.ApplicationCommandType.User,
3101
3288
  options: void 0,
3102
3289
  description_localizations: void 0,
3103
3290
  // @ts-ignore
3104
3291
  description: void 0
3105
3292
  });
3106
3293
  }
3107
- if (cmd.data.messageContextMenu && json.type !== import_discord14.ApplicationCommandType.Message) {
3294
+ if (cmd.data.messageContextMenu && json.type !== import_discord20.ApplicationCommandType.Message) {
3108
3295
  collections.push({
3109
3296
  ...json,
3110
- type: import_discord14.ApplicationCommandType.Message,
3297
+ type: import_discord20.ApplicationCommandType.Message,
3111
3298
  description_localizations: void 0,
3112
3299
  // @ts-ignore
3113
3300
  description: void 0,
@@ -3174,7 +3361,7 @@ var init_CommandRegistrar = __esm({
3174
3361
  });
3175
3362
  try {
3176
3363
  const data = await this.api.put(
3177
- import_discord14.Routes.applicationCommands(this.commandkit.client.user.id),
3364
+ import_discord20.Routes.applicationCommands(this.commandkit.client.user.id),
3178
3365
  {
3179
3366
  body: commands.map((c) => ({
3180
3367
  ...c,
@@ -3237,7 +3424,7 @@ var init_CommandRegistrar = __esm({
3237
3424
  });
3238
3425
  if (prevented2) continue;
3239
3426
  const data = await this.api.put(
3240
- import_discord14.Routes.applicationGuildCommands(
3427
+ import_discord20.Routes.applicationGuildCommands(
3241
3428
  this.commandkit.client.user.id,
3242
3429
  guild
3243
3430
  ),
@@ -3795,12 +3982,12 @@ var init_Context = __esm({
3795
3982
  });
3796
3983
 
3797
3984
  // src/app/commands/AppCommandRunner.ts
3798
- var import_discord15, _AppCommandRunner_instances, finalizer_fn, _AppCommandRunner, AppCommandRunner;
3985
+ var import_discord21, _AppCommandRunner_instances, finalizer_fn, _AppCommandRunner, AppCommandRunner;
3799
3986
  var init_AppCommandRunner = __esm({
3800
3987
  "src/app/commands/AppCommandRunner.ts"() {
3801
3988
  "use strict";
3802
3989
  init_cjs_shims();
3803
- import_discord15 = require("discord.js");
3990
+ import_discord21 = require("discord.js");
3804
3991
  init_environment();
3805
3992
  init_Logger();
3806
3993
  init_Context();
@@ -3824,8 +4011,8 @@ var init_AppCommandRunner = __esm({
3824
4011
  command: prepared.command,
3825
4012
  environment: env,
3826
4013
  executionMode,
3827
- interaction: !(source instanceof import_discord15.Message) ? source : null,
3828
- message: source instanceof import_discord15.Message ? source : null,
4014
+ interaction: !(source instanceof import_discord21.Message) ? source : null,
4015
+ message: source instanceof import_discord21.Message ? source : null,
3829
4016
  forwarded: false,
3830
4017
  customArgs: {
3831
4018
  setCommandRunner: /* @__PURE__ */ __name((fn) => {
@@ -3930,7 +4117,7 @@ var init_AppCommandRunner = __esm({
3930
4117
  }
3931
4118
  }
3932
4119
  getExecutionMode(source) {
3933
- if (source instanceof import_discord15.Message) return CommandExecutionMode.Message;
4120
+ if (source instanceof import_discord21.Message) return CommandExecutionMode.Message;
3934
4121
  if (source.isChatInputCommand())
3935
4122
  return CommandExecutionMode.ChatInputCommand;
3936
4123
  if (source.isAutocomplete()) {
@@ -4020,12 +4207,12 @@ var init_types_package = __esm({
4020
4207
  });
4021
4208
 
4022
4209
  // src/app/handlers/AppCommandHandler.ts
4023
- var import_discord16, commandDataSchema, middlewareDataSchema, _AppCommandHandler, AppCommandHandler;
4210
+ var import_discord22, commandDataSchema, middlewareDataSchema, _AppCommandHandler, AppCommandHandler;
4024
4211
  var init_AppCommandHandler = __esm({
4025
4212
  "src/app/handlers/AppCommandHandler.ts"() {
4026
4213
  "use strict";
4027
4214
  init_cjs_shims();
4028
- import_discord16 = require("discord.js");
4215
+ import_discord22 = require("discord.js");
4029
4216
  init_resolve_file_url();
4030
4217
  init_MessageCommandParser();
4031
4218
  init_error_codes();
@@ -4036,7 +4223,7 @@ var init_AppCommandHandler = __esm({
4036
4223
  init_types_package();
4037
4224
  init_colors();
4038
4225
  commandDataSchema = {
4039
- command: /* @__PURE__ */ __name((c) => c instanceof import_discord16.SlashCommandBuilder || c instanceof import_discord16.ContextMenuCommandBuilder || c && typeof c === "object", "command"),
4226
+ command: /* @__PURE__ */ __name((c) => c instanceof import_discord22.SlashCommandBuilder || c instanceof import_discord22.ContextMenuCommandBuilder || c && typeof c === "object", "command"),
4040
4227
  chatInput: /* @__PURE__ */ __name((c) => typeof c === "function", "chatInput"),
4041
4228
  autocomplete: /* @__PURE__ */ __name((c) => typeof c === "function", "autocomplete"),
4042
4229
  message: /* @__PURE__ */ __name((c) => typeof c === "function", "message"),
@@ -4052,8 +4239,8 @@ var init_AppCommandHandler = __esm({
4052
4239
  this.commandkit = commandkit2;
4053
4240
  this.registrar = new CommandRegistrar(this.commandkit);
4054
4241
  }
4055
- loadedCommands = new import_discord16.Collection();
4056
- loadedMiddlewares = new import_discord16.Collection();
4242
+ loadedCommands = new import_discord22.Collection();
4243
+ loadedMiddlewares = new import_discord22.Collection();
4057
4244
  // Name-to-ID mapping for easier lookup
4058
4245
  commandNameToId = /* @__PURE__ */ new Map();
4059
4246
  subcommandPathToId = /* @__PURE__ */ new Map();
@@ -4061,8 +4248,8 @@ var init_AppCommandHandler = __esm({
4061
4248
  onInteraction = null;
4062
4249
  onMessageCreate = null;
4063
4250
  commandRunner = new AppCommandRunner(this);
4064
- externalCommandData = new import_discord16.Collection();
4065
- externalMiddlewareData = new import_discord16.Collection();
4251
+ externalCommandData = new import_discord22.Collection();
4252
+ externalMiddlewareData = new import_discord22.Collection();
4066
4253
  printBanner() {
4067
4254
  const uncategorized = crypto.randomUUID();
4068
4255
  const categorizedCommands = this.getCommandsArray().reduce(
@@ -4180,14 +4367,14 @@ var init_AppCommandHandler = __esm({
4180
4367
  if (!prepared) return;
4181
4368
  return this.commandRunner.runCommand(prepared, message);
4182
4369
  };
4183
- this.commandkit.client.on(import_discord16.Events.InteractionCreate, this.onInteraction);
4184
- this.commandkit.client.on(import_discord16.Events.MessageCreate, this.onMessageCreate);
4370
+ this.commandkit.client.on(import_discord22.Events.InteractionCreate, this.onInteraction);
4371
+ this.commandkit.client.on(import_discord22.Events.MessageCreate, this.onMessageCreate);
4185
4372
  }
4186
4373
  async prepareCommandRun(source, cmdName) {
4187
4374
  var _a;
4188
4375
  let parser;
4189
4376
  if (!cmdName) {
4190
- if (source instanceof import_discord16.Message) {
4377
+ if (source instanceof import_discord22.Message) {
4191
4378
  if (source.author.bot) return null;
4192
4379
  const prefix = await this.commandkit.config.getMessageCommandPrefix(source);
4193
4380
  parser = new MessageCommandParser(
@@ -4233,7 +4420,7 @@ var init_AppCommandHandler = __esm({
4233
4420
  if (!commandId) return null;
4234
4421
  const loadedCommand = this.loadedCommands.get(commandId);
4235
4422
  if (!loadedCommand) return null;
4236
- if ((source instanceof import_discord16.CommandInteraction || source instanceof import_discord16.AutocompleteInteraction) && source.guildId && ((_a = loadedCommand.guilds) == null ? void 0 : _a.length) && !loadedCommand.guilds.includes(source.guildId)) {
4423
+ if ((source instanceof import_discord22.CommandInteraction || source instanceof import_discord22.AutocompleteInteraction) && source.guildId && ((_a = loadedCommand.guilds) == null ? void 0 : _a.length) && !loadedCommand.guilds.includes(source.guildId)) {
4237
4424
  return null;
4238
4425
  }
4239
4426
  const middlewares = [];
@@ -4393,12 +4580,12 @@ var init_AppCommandHandler = __esm({
4393
4580
  });
4394
4581
 
4395
4582
  // src/app/router/CommandsRouter.ts
4396
- var import_discord17, import_node_fs3, import_promises3, import_node_path3, MIDDLEWARE_PATTERN, COMMAND_MIDDLEWARE_PATTERN, GLOBAL_MIDDLEWARE_PATTERN, COMMAND_PATTERN, CATEGORY_PATTERN, _CommandsRouter, CommandsRouter;
4583
+ var import_discord23, import_node_fs3, import_promises3, import_node_path3, MIDDLEWARE_PATTERN, COMMAND_MIDDLEWARE_PATTERN, GLOBAL_MIDDLEWARE_PATTERN, COMMAND_PATTERN, CATEGORY_PATTERN, _CommandsRouter, CommandsRouter;
4397
4584
  var init_CommandsRouter = __esm({
4398
4585
  "src/app/router/CommandsRouter.ts"() {
4399
4586
  "use strict";
4400
4587
  init_cjs_shims();
4401
- import_discord17 = require("discord.js");
4588
+ import_discord23 = require("discord.js");
4402
4589
  import_node_fs3 = require("fs");
4403
4590
  import_promises3 = require("fs/promises");
4404
4591
  import_node_path3 = require("path");
@@ -4411,8 +4598,8 @@ var init_CommandsRouter = __esm({
4411
4598
  constructor(options) {
4412
4599
  this.options = options;
4413
4600
  }
4414
- commands = new import_discord17.Collection();
4415
- middlewares = new import_discord17.Collection();
4601
+ commands = new import_discord23.Collection();
4602
+ middlewares = new import_discord23.Collection();
4416
4603
  populate(data) {
4417
4604
  for (const [id, command] of Object.entries(data.commands)) {
4418
4605
  this.commands.set(id, command);
@@ -4533,12 +4720,12 @@ var init_CommandsRouter = __esm({
4533
4720
  });
4534
4721
 
4535
4722
  // src/app/router/EventsRouter.ts
4536
- var import_discord18, import_node_fs4, import_promises4, import_node_path4, _EventsRouter, EventsRouter;
4723
+ var import_discord24, import_node_fs4, import_promises4, import_node_path4, _EventsRouter, EventsRouter;
4537
4724
  var init_EventsRouter = __esm({
4538
4725
  "src/app/router/EventsRouter.ts"() {
4539
4726
  "use strict";
4540
4727
  init_cjs_shims();
4541
- import_discord18 = require("discord.js");
4728
+ import_discord24 = require("discord.js");
4542
4729
  import_node_fs4 = require("fs");
4543
4730
  import_promises4 = require("fs/promises");
4544
4731
  import_node_path4 = require("path");
@@ -4559,7 +4746,7 @@ var init_EventsRouter = __esm({
4559
4746
  }
4560
4747
  }
4561
4748
  /** Internal storage of parsed events */
4562
- events = new import_discord18.Collection();
4749
+ events = new import_discord24.Collection();
4563
4750
  /**
4564
4751
  * Adds new entrypoints to the router
4565
4752
  * @param entrypoints - Array of new entrypoint paths
@@ -4943,7 +5130,7 @@ async function copyLocaleFiles(_from, _to) {
4943
5130
  }
4944
5131
  }
4945
5132
  var import_rimraf, import_node_path5, import_node_fs5, import_node_child_process, ts, packageManager;
4946
- var init_common2 = __esm({
5133
+ var init_common3 = __esm({
4947
5134
  "src/cli/common.ts"() {
4948
5135
  "use strict";
4949
5136
  init_cjs_shims();
@@ -4995,7 +5182,7 @@ var init_loader = __esm({
4995
5182
  init_cjs_shims();
4996
5183
  import_node_fs6 = require("fs");
4997
5184
  import_node_path6 = require("path");
4998
- init_common2();
5185
+ init_common3();
4999
5186
  init_config();
5000
5187
  CONFIG_FILE_NAMES = [
5001
5188
  "commandkit.config.js",
@@ -5127,7 +5314,7 @@ function onBootstrap(fn) {
5127
5314
  function onApplicationBootstrap(fn) {
5128
5315
  onApplicationBootstrapHooks.add(fn);
5129
5316
  }
5130
- var import_node_events2, import_discord19, import_node_path7, import_node_fs7, commandkit, bootstrapHooks, onApplicationBootstrapHooks, _started, _CommandKit_instances, bootstrapHooks_fn, applicationBootstrapHooks_fn, init_fn, initCommands_fn, initEvents_fn, _CommandKit, CommandKit;
5317
+ var import_node_events2, import_discord25, import_node_path7, import_node_fs7, commandkit, bootstrapHooks, onApplicationBootstrapHooks, _started, _CommandKit_instances, bootstrapHooks_fn, applicationBootstrapHooks_fn, init_fn, initCommands_fn, initEvents_fn, _CommandKit, CommandKit;
5131
5318
  var init_CommandKit = __esm({
5132
5319
  "src/CommandKit.ts"() {
5133
5320
  "use strict";
@@ -5138,7 +5325,7 @@ var init_CommandKit = __esm({
5138
5325
  init_MemoryCache();
5139
5326
  init_components();
5140
5327
  init_EventInterceptor();
5141
- import_discord19 = require("discord.js");
5328
+ import_discord25 = require("discord.js");
5142
5329
  init_utilities();
5143
5330
  import_node_path7 = require("path");
5144
5331
  init_AppCommandHandler();
@@ -5184,7 +5371,7 @@ var init_CommandKit = __esm({
5184
5371
  __privateAdd(this, _started, false);
5185
5372
  __publicField(this, "eventInterceptor");
5186
5373
  __publicField(this, "config", {
5187
- defaultLocale: import_discord19.Locale.EnglishUS,
5374
+ defaultLocale: import_discord25.Locale.EnglishUS,
5188
5375
  getMessageCommandPrefix: /* @__PURE__ */ __name(() => "!", "getMessageCommandPrefix")
5189
5376
  });
5190
5377
  __publicField(this, "commandsRouter");
@@ -5230,7 +5417,7 @@ var init_CommandKit = __esm({
5230
5417
  this.commandHandler.registerCommandHandler();
5231
5418
  this.incrementClientListenersCount();
5232
5419
  if (token !== false && !this.options.client.isReady()) {
5233
- this.client.once(import_discord19.Events.ClientReady, async () => {
5420
+ this.client.once(import_discord25.Events.ClientReady, async () => {
5234
5421
  await this.commandHandler.registrar.register();
5235
5422
  });
5236
5423
  await this.plugins.execute((ctx, plugin) => {
@@ -5442,7 +5629,7 @@ var init_version = __esm({
5442
5629
  "use strict";
5443
5630
  init_cjs_shims();
5444
5631
  version = /* @__MACRO__ $version */
5445
- "0.1.11-dev.20250422144359";
5632
+ "0.1.11-dev.20250426143847";
5446
5633
  }
5447
5634
  });
5448
5635
 
@@ -5518,7 +5705,7 @@ var init_app_process = __esm({
5518
5705
  init_env();
5519
5706
  import_node_path8 = require("path");
5520
5707
  import_node_fs8 = require("fs");
5521
- init_common2();
5708
+ init_common3();
5522
5709
  __name(getStdio, "getStdio");
5523
5710
  __name(createAppProcess, "createAppProcess");
5524
5711
  }
@@ -5624,7 +5811,7 @@ var init_type_checker = __esm({
5624
5811
  "use strict";
5625
5812
  init_cjs_shims();
5626
5813
  import_node_fs9 = require("fs");
5627
- init_common2();
5814
+ init_common3();
5628
5815
  import_node_path9 = require("path");
5629
5816
  init_colors();
5630
5817
  TS_NOT_FOUND_ERR = `TypeScript must be installed in order to use the type checker. Please install it using \`npm install typescript\` or \`yarn add typescript\``;
@@ -5738,7 +5925,7 @@ var init_build = __esm({
5738
5925
  init_env();
5739
5926
  import_rimraf2 = require("rimraf");
5740
5927
  init_type_checker();
5741
- init_common2();
5928
+ init_common3();
5742
5929
  __name(buildApplication, "buildApplication");
5743
5930
  envScript = /* @__PURE__ */ __name((dev) => `// --- Environment Variables Loader ---
5744
5931
  const $env = [${(dev ? devEnvFileArgs : prodEnvFileArgs).map((p) => `"${p}"`).join(", ")}];
@@ -6041,7 +6228,7 @@ var init_production = __esm({
6041
6228
  init_loader();
6042
6229
  init_app_process();
6043
6230
  import_fs = require("fs");
6044
- init_common2();
6231
+ init_common3();
6045
6232
  init_build();
6046
6233
  init_plugins();
6047
6234
  init_utils();
@@ -6145,7 +6332,7 @@ var init_generators = __esm({
6145
6332
  init_cjs_shims();
6146
6333
  import_promises7 = require("fs/promises");
6147
6334
  import_path4 = require("path");
6148
- init_common2();
6335
+ init_common3();
6149
6336
  import_fs2 = require("fs");
6150
6337
  init_colors();
6151
6338
  BASE_PATH = process.cwd();
@@ -6333,14 +6520,18 @@ __export(index_exports, {
6333
6520
  CommandsRouter: () => CommandsRouter,
6334
6521
  CompilerPlugin: () => CompilerPlugin,
6335
6522
  CompilerPluginRuntime: () => CompilerPluginRuntime,
6523
+ Container: () => Container,
6336
6524
  Context: () => Context,
6337
6525
  DefaultLogger: () => DefaultLogger,
6338
6526
  ElementType: () => ElementType,
6339
6527
  EventInterceptor: () => EventInterceptor,
6340
6528
  EventsRouter: () => EventsRouter,
6529
+ File: () => File,
6341
6530
  Fragment: () => Fragment,
6342
6531
  HMREventType: () => HMREventType,
6343
6532
  Logger: () => Logger,
6533
+ MediaGallery: () => MediaGallery,
6534
+ MediaGalleryItem: () => MediaGalleryItem,
6344
6535
  MemoryCache: () => MemoryCache,
6345
6536
  MentionableSelectMenu: () => MentionableSelectMenu,
6346
6537
  MentionableSelectMenuKit: () => MentionableSelectMenuKit,
@@ -6353,10 +6544,13 @@ __export(index_exports, {
6353
6544
  RoleSelectMenu: () => RoleSelectMenu,
6354
6545
  RoleSelectMenuKit: () => RoleSelectMenuKit,
6355
6546
  RuntimePlugin: () => RuntimePlugin,
6547
+ Section: () => Section,
6548
+ Separator: () => Separator,
6356
6549
  ShortInput: () => ShortInput,
6357
6550
  StringSelectMenu: () => StringSelectMenu,
6358
6551
  StringSelectMenuKit: () => StringSelectMenuKit,
6359
6552
  StringSelectMenuOption: () => StringSelectMenuOption,
6553
+ TextDisplay: () => TextDisplay,
6360
6554
  TextInput: () => TextInput,
6361
6555
  UserSelectMenu: () => UserSelectMenu,
6362
6556
  UserSelectMenuKit: () => UserSelectMenuKit,
@@ -6601,9 +6795,9 @@ init_CommandRegistrar();
6601
6795
 
6602
6796
  // src/app/commands/helpers.ts
6603
6797
  init_cjs_shims();
6604
- var import_discord20 = require("discord.js");
6798
+ var import_discord26 = require("discord.js");
6605
6799
  function isMessageSource(source) {
6606
- return source instanceof import_discord20.Message;
6800
+ return source instanceof import_discord26.Message;
6607
6801
  }
6608
6802
  __name(isMessageSource, "isMessageSource");
6609
6803
  function isInteractionSource(source) {
@@ -6707,14 +6901,18 @@ var index_default = CommandKit;
6707
6901
  CommandsRouter,
6708
6902
  CompilerPlugin,
6709
6903
  CompilerPluginRuntime,
6904
+ Container,
6710
6905
  Context,
6711
6906
  DefaultLogger,
6712
6907
  ElementType,
6713
6908
  EventInterceptor,
6714
6909
  EventsRouter,
6910
+ File,
6715
6911
  Fragment,
6716
6912
  HMREventType,
6717
6913
  Logger,
6914
+ MediaGallery,
6915
+ MediaGalleryItem,
6718
6916
  MemoryCache,
6719
6917
  MentionableSelectMenu,
6720
6918
  MentionableSelectMenuKit,
@@ -6727,10 +6925,13 @@ var index_default = CommandKit;
6727
6925
  RoleSelectMenu,
6728
6926
  RoleSelectMenuKit,
6729
6927
  RuntimePlugin,
6928
+ Section,
6929
+ Separator,
6730
6930
  ShortInput,
6731
6931
  StringSelectMenu,
6732
6932
  StringSelectMenuKit,
6733
6933
  StringSelectMenuOption,
6934
+ TextDisplay,
6734
6935
  TextInput,
6735
6936
  UserSelectMenu,
6736
6937
  UserSelectMenuKit,