trivious 1.5.0 → 1.5.2

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.
Files changed (55) hide show
  1. package/dist/core/builders/util.builders.cjs +15 -0
  2. package/dist/core/builders/util.builders.cjs.map +1 -0
  3. package/dist/core/builders/util.builders.d.cts +6 -0
  4. package/dist/core/builders/util.builders.d.ts +6 -0
  5. package/dist/core/builders/util.builders.js +12 -0
  6. package/dist/core/builders/util.builders.js.map +1 -0
  7. package/dist/core/client/trivious.client.d.cts +2 -1
  8. package/dist/core/client/trivious.client.d.ts +2 -1
  9. package/dist/core/commands/command.base.d.cts +2 -1
  10. package/dist/core/commands/command.base.d.ts +2 -1
  11. package/dist/core/commands/subcommand.base.cjs +8 -1
  12. package/dist/core/commands/subcommand.base.cjs.map +1 -1
  13. package/dist/core/commands/subcommand.base.d.cts +2 -1
  14. package/dist/core/commands/subcommand.base.d.ts +2 -1
  15. package/dist/core/commands/subcommand.base.js +8 -1
  16. package/dist/core/commands/subcommand.base.js.map +1 -1
  17. package/dist/core/components/component.base.d.cts +2 -1
  18. package/dist/core/components/component.base.d.ts +2 -1
  19. package/dist/core/events/clientReady.d.cts +2 -1
  20. package/dist/core/events/clientReady.d.ts +2 -1
  21. package/dist/core/events/interactionCreate.d.cts +2 -1
  22. package/dist/core/events/interactionCreate.d.ts +2 -1
  23. package/dist/core/registry/command.registry.d.cts +2 -1
  24. package/dist/core/registry/command.registry.d.ts +2 -1
  25. package/dist/core/registry/component.registry.d.cts +2 -1
  26. package/dist/core/registry/component.registry.d.ts +2 -1
  27. package/dist/core/registry/event.registry.d.cts +2 -1
  28. package/dist/core/registry/event.registry.d.ts +2 -1
  29. package/dist/core/registry/index.d.cts +2 -1
  30. package/dist/core/registry/index.d.ts +2 -1
  31. package/dist/core/registry/module.registry.d.cts +2 -1
  32. package/dist/core/registry/module.registry.d.ts +2 -1
  33. package/dist/{index-LB0d9s2b.d.ts → index-HF-OBZPh.d.ts} +4 -2
  34. package/dist/{index-B7hbKkOJ.d.cts → index-ezMHiXmy.d.cts} +4 -2
  35. package/dist/index.cjs +9 -0
  36. package/dist/index.d.cts +2 -1
  37. package/dist/index.d.ts +2 -1
  38. package/dist/index.js +1 -0
  39. package/dist/shared/typings/client.d.cts +2 -1
  40. package/dist/shared/typings/client.d.ts +2 -1
  41. package/dist/shared/typings/commands.d.cts +2 -1
  42. package/dist/shared/typings/commands.d.ts +2 -1
  43. package/dist/shared/typings/components.d.cts +2 -1
  44. package/dist/shared/typings/components.d.ts +2 -1
  45. package/dist/shared/typings/events.d.cts +2 -1
  46. package/dist/shared/typings/events.d.ts +2 -1
  47. package/dist/shared/typings/index.d.cts +2 -1
  48. package/dist/shared/typings/index.d.ts +2 -1
  49. package/dist/shared/typings/module.d.cts +2 -1
  50. package/dist/shared/typings/module.d.ts +2 -1
  51. package/dist/shared/typings/permissions.d.cts +2 -1
  52. package/dist/shared/typings/permissions.d.ts +2 -1
  53. package/dist/shared/utility/functions.d.cts +2 -1
  54. package/dist/shared/utility/functions.d.ts +2 -1
  55. package/package.json +1 -1
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var discord_js = require('discord.js');
4
+
5
+ function createActionRow(...builders) {
6
+ return new discord_js.ActionRowBuilder().setComponents(...builders);
7
+ }
8
+ function createEmbed(data) {
9
+ return new discord_js.EmbedBuilder(data);
10
+ }
11
+
12
+ exports.createActionRow = createActionRow;
13
+ exports.createEmbed = createEmbed;
14
+ //# sourceMappingURL=util.builders.cjs.map
15
+ //# sourceMappingURL=util.builders.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/builders/util.builders.ts"],"names":["ActionRowBuilder","EmbedBuilder"],"mappings":";;;;AAEO,SAAS,mBAA+D,QAAA,EAAe;AAC7F,EAAA,OAAO,IAAIA,2BAAA,EAAoB,CAAE,aAAA,CAAc,GAAG,QAAQ,CAAA;AAC3D;AAEO,SAAS,YAAY,IAAA,EAA6B;AACxD,EAAA,OAAO,IAAIC,wBAAa,IAAI,CAAA;AAC7B","file":"util.builders.cjs","sourcesContent":["import { ActionRowBuilder, APIEmbed, EmbedBuilder, EmbedData, MessageActionRowComponentBuilder } from \"discord.js\";\n\nexport function createActionRow<T extends MessageActionRowComponentBuilder>(...builders: T[]) {\n\treturn new ActionRowBuilder<T>().setComponents(...builders);\n}\n\nexport function createEmbed(data?: EmbedData | APIEmbed) {\n\treturn new EmbedBuilder(data);\n}\n"]}
@@ -0,0 +1,6 @@
1
+ import { MessageActionRowComponentBuilder, ActionRowBuilder, EmbedData, APIEmbed, EmbedBuilder } from 'discord.js';
2
+
3
+ declare function createActionRow<T extends MessageActionRowComponentBuilder>(...builders: T[]): ActionRowBuilder<T>;
4
+ declare function createEmbed(data?: EmbedData | APIEmbed): EmbedBuilder;
5
+
6
+ export { createActionRow, createEmbed };
@@ -0,0 +1,6 @@
1
+ import { MessageActionRowComponentBuilder, ActionRowBuilder, EmbedData, APIEmbed, EmbedBuilder } from 'discord.js';
2
+
3
+ declare function createActionRow<T extends MessageActionRowComponentBuilder>(...builders: T[]): ActionRowBuilder<T>;
4
+ declare function createEmbed(data?: EmbedData | APIEmbed): EmbedBuilder;
5
+
6
+ export { createActionRow, createEmbed };
@@ -0,0 +1,12 @@
1
+ import { ActionRowBuilder, EmbedBuilder } from 'discord.js';
2
+
3
+ function createActionRow(...builders) {
4
+ return new ActionRowBuilder().setComponents(...builders);
5
+ }
6
+ function createEmbed(data) {
7
+ return new EmbedBuilder(data);
8
+ }
9
+
10
+ export { createActionRow, createEmbed };
11
+ //# sourceMappingURL=util.builders.js.map
12
+ //# sourceMappingURL=util.builders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/builders/util.builders.ts"],"names":[],"mappings":";;AAEO,SAAS,mBAA+D,QAAA,EAAe;AAC7F,EAAA,OAAO,IAAI,gBAAA,EAAoB,CAAE,aAAA,CAAc,GAAG,QAAQ,CAAA;AAC3D;AAEO,SAAS,YAAY,IAAA,EAA6B;AACxD,EAAA,OAAO,IAAI,aAAa,IAAI,CAAA;AAC7B","file":"util.builders.js","sourcesContent":["import { ActionRowBuilder, APIEmbed, EmbedBuilder, EmbedData, MessageActionRowComponentBuilder } from \"discord.js\";\n\nexport function createActionRow<T extends MessageActionRowComponentBuilder>(...builders: T[]) {\n\treturn new ActionRowBuilder<T>().setComponents(...builders);\n}\n\nexport function createEmbed(data?: EmbedData | APIEmbed) {\n\treturn new EmbedBuilder(data);\n}\n"]}
@@ -1,3 +1,4 @@
1
- export { T as default } from '../../index-B7hbKkOJ.cjs';
1
+ export { T as default } from '../../index-ezMHiXmy.cjs';
2
2
  import 'discord.js';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
- export { T as default } from '../../index-LB0d9s2b.js';
1
+ export { T as default } from '../../index-HF-OBZPh.js';
2
2
  import 'discord.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { j as CommandBuilder, l as ContextMenuBuilder, k as ContextMenuCommand, S as SlashCommand, i as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { j as CommandBuilder, l as ContextMenuBuilder, k as ContextMenuCommand, S as SlashCommand, i as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { j as CommandBuilder, l as ContextMenuBuilder, k as ContextMenuCommand, S as SlashCommand, i as default } from '../../index-LB0d9s2b.js';
2
+ export { j as CommandBuilder, l as ContextMenuBuilder, k as ContextMenuCommand, S as SlashCommand, i as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -71,6 +71,13 @@ class SubcommandBuilder extends discord_js.SlashCommandSubcommandBuilder {
71
71
  }
72
72
  }
73
73
  class Subcommand {
74
+ data;
75
+ metadata;
76
+ constructor(builder) {
77
+ const { data, metadata } = builder.build();
78
+ this.data = data;
79
+ this.metadata = metadata;
80
+ }
74
81
  /**
75
82
  * Reply to the interaction respecting command metadata and if the interaction has already been replied to.
76
83
  *
@@ -80,7 +87,7 @@ class Subcommand {
80
87
  * @returns {*}
81
88
  */
82
89
  async reply(interaction, options) {
83
- if (interaction.replied) {
90
+ if (interaction.replied || interaction.deferred) {
84
91
  await interaction.editReply(options);
85
92
  return;
86
93
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/commands/subcommand.base.ts"],"names":["SlashCommandSubcommandBuilder","PermissionLevel"],"mappings":";;;;;;;AAmBO,MAAM,0BAA0BA,wCAAA,CAA8B;AAAA,EAC5D,OAAA,GAAU,IAAA;AAAA,EACV,UAAA,GAAa,KAAA;AAAA,EACb,cAAcC,wBAAA,CAAgB,IAAA;AAAA,EAC9B,eAAA,GAAkB,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnB,OAAA,GAAgB;AACtB,IAAA,IAAA,CAAK,OAAA,GAAU,KAAA;AACf,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,YAAA,GAAqB;AAC3B,IAAA,IAAA,CAAK,cAAcA,wBAAA,CAAgB,SAAA;AACnC,IAAA,IAAA,CAAK,UAAA,GAAa,IAAA;AAClB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,cAAc,UAAA,EAAmC;AACvD,IAAA,IAAA,CAAK,WAAA,GAAc,UAAA;AACnB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,iBAAA,GAA0B;AAChC,IAAA,IAAA,CAAK,eAAA,GAAkB,IAAA;AACvB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,KAAA,GAAQ;AACd,IAAA,OAAO;AAAA,MACN,IAAA,EAAM,IAAA;AAAA,MACN,QAAA,EAAU;AAAA,QACT,QAAQ,IAAA,CAAK,OAAA;AAAA,QACb,WAAW,IAAA,CAAK,UAAA;AAAA,QAChB,YAAY,IAAA,CAAK,WAAA;AAAA,QACjB,gBAAgB,IAAA,CAAK;AAAA;AACtB,KACD;AAAA,EACD;AACD;AAUA,MAAO,UAAA,CAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA0BxC,MAAM,KAAA,CACL,WAAA,EACA,OAAA,EACC;AACD,IAAA,IAAI,YAAY,OAAA,EAAS;AACxB,MAAA,MAAM,WAAA,CAAY,UAAU,OAAsC,CAAA;AAClE,MAAA;AAAA,IACD;AAEA,IAAA,MAAM,UAAA,GAAa,EAAE,GAAG,OAAA,EAAQ;AAChC,IAAA,IAAI,KAAK,QAAA,CAAS,cAAA,EAAgB,UAAA,CAAW,KAAA,GAAQ,CAAC,WAAW,CAAA;AAEjE,IAAA,MAAM,WAAA,CAAY,MAAM,UAAU,CAAA;AAAA,EACnC;AACD","file":"subcommand.base.cjs","sourcesContent":["import {\n\tCacheType,\n\tChatInputCommandInteraction,\n\tInteractionEditReplyOptions,\n\tInteractionReplyOptions,\n\tMessagePayload,\n\tSlashCommandSubcommandBuilder,\n} from \"discord.js\";\nimport { PermissionLevel, SubcommandMetadata } from \"src/shared/typings/index.js\";\nimport { TriviousClient } from \"src/index.js\";\n\n/**\n * Base SubcommandBuilder.\n *\n * @export\n * @class SubcommandBuilder\n * @typedef {SubcommandBuilder}\n * @extends {SlashCommandSubcommandBuilder}\n */\nexport class SubcommandBuilder extends SlashCommandSubcommandBuilder {\n\tprivate _active = true;\n\tprivate _ownerOnly = false;\n\tprivate _permission = PermissionLevel.USER;\n\tprivate _ephemeralReply = false;\n\n\t/**\n\t * Set the subcommand as disabled.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic disable(): this {\n\t\tthis._active = false;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the subcommand as owner only.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setOwnerOnly(): this {\n\t\tthis._permission = PermissionLevel.BOT_OWNER;\n\t\tthis._ownerOnly = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the permission level required to run the subcommand.\n\t *\n\t * @public\n\t * @param {PermissionLevel} permission\n\t * @returns {this}\n\t */\n\tpublic setPermission(permission: PermissionLevel): this {\n\t\tthis._permission = permission;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the interaction as ephemeral\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setEphemeralReply(): this {\n\t\tthis._ephemeralReply = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Build the builder.\n\t *\n\t * @public\n\t * @returns {{ data: SlashCommandSubcommandBuilder; metadata: SubcommandMetadata; }}\n\t */\n\tpublic build() {\n\t\treturn {\n\t\t\tdata: this as SlashCommandSubcommandBuilder,\n\t\t\tmetadata: {\n\t\t\t\tactive: this._active,\n\t\t\t\townerOnly: this._ownerOnly,\n\t\t\t\tpermission: this._permission,\n\t\t\t\tephemeralReply: this._ephemeralReply,\n\t\t\t} satisfies SubcommandMetadata,\n\t\t};\n\t}\n}\n\n/**\n * Base Subcommand\n *\n * @export\n * @abstract\n * @class Subcommand\n * @typedef {Subcommand}\n */\nexport default abstract class Subcommand {\n\tabstract data: SlashCommandSubcommandBuilder;\n\tabstract metadata: SubcommandMetadata;\n\t/**\n\t * Function to execute the subcommand.\n\t *\n\t * @abstract\n\t * @readonly\n\t * @type {(\n\t * \t\tclient: TriviousClient,\n\t * \t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t * \t) => Promise<void>}\n\t */\n\tabstract readonly execute: (\n\t\tclient: TriviousClient,\n\t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t) => Promise<void>;\n\n\t/**\n\t * Reply to the interaction respecting command metadata and if the interaction has already been replied to.\n\t *\n\t * @async\n\t * @param {ChatInputCommandInteraction<CacheType>} interaction\n\t * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options\n\t * @returns {*}\n\t */\n\tasync reply(\n\t\tinteraction: ChatInputCommandInteraction<CacheType>,\n\t\toptions: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions\n\t) {\n\t\tif (interaction.replied) {\n\t\t\tawait interaction.editReply(options as InteractionEditReplyOptions);\n\t\t\treturn;\n\t\t}\n\n\t\tconst newOptions = { ...options } as InteractionReplyOptions;\n\t\tif (this.metadata.ephemeralReply) newOptions.flags = [\"Ephemeral\"];\n\n\t\tawait interaction.reply(newOptions);\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../src/core/commands/subcommand.base.ts"],"names":["SlashCommandSubcommandBuilder","PermissionLevel"],"mappings":";;;;;;;AAmBO,MAAM,0BAA0BA,wCAAA,CAA8B;AAAA,EAC5D,OAAA,GAAU,IAAA;AAAA,EACV,UAAA,GAAa,KAAA;AAAA,EACb,cAAcC,wBAAA,CAAgB,IAAA;AAAA,EAC9B,eAAA,GAAkB,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnB,OAAA,GAAgB;AACtB,IAAA,IAAA,CAAK,OAAA,GAAU,KAAA;AACf,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,YAAA,GAAqB;AAC3B,IAAA,IAAA,CAAK,cAAcA,wBAAA,CAAgB,SAAA;AACnC,IAAA,IAAA,CAAK,UAAA,GAAa,IAAA;AAClB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,cAAc,UAAA,EAAmC;AACvD,IAAA,IAAA,CAAK,WAAA,GAAc,UAAA;AACnB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,iBAAA,GAA0B;AAChC,IAAA,IAAA,CAAK,eAAA,GAAkB,IAAA;AACvB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,KAAA,GAAQ;AACd,IAAA,OAAO;AAAA,MACN,IAAA,EAAM,IAAA;AAAA,MACN,QAAA,EAAU;AAAA,QACT,QAAQ,IAAA,CAAK,OAAA;AAAA,QACb,WAAW,IAAA,CAAK,UAAA;AAAA,QAChB,YAAY,IAAA,CAAK,WAAA;AAAA,QACjB,gBAAgB,IAAA,CAAK;AAAA;AACtB,KACD;AAAA,EACD;AACD;AAUA,MAAO,UAAA,CAAkC;AAAA,EACxB,IAAA;AAAA,EACA,QAAA;AAAA,EAEN,YAAY,OAAA,EAA4B;AACjD,IAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAS,GAAI,QAAQ,KAAA,EAAM;AACzC,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBA,MAAM,KAAA,CACL,WAAA,EACA,OAAA,EACC;AACD,IAAA,IAAI,WAAA,CAAY,OAAA,IAAW,WAAA,CAAY,QAAA,EAAU;AAChD,MAAA,MAAM,WAAA,CAAY,UAAU,OAAsC,CAAA;AAClE,MAAA;AAAA,IACD;AAEA,IAAA,MAAM,UAAA,GAAa,EAAE,GAAG,OAAA,EAAQ;AAChC,IAAA,IAAI,KAAK,QAAA,CAAS,cAAA,EAAgB,UAAA,CAAW,KAAA,GAAQ,CAAC,WAAW,CAAA;AAEjE,IAAA,MAAM,WAAA,CAAY,MAAM,UAAU,CAAA;AAAA,EACnC;AACD","file":"subcommand.base.cjs","sourcesContent":["import {\n\tCacheType,\n\tChatInputCommandInteraction,\n\tInteractionEditReplyOptions,\n\tInteractionReplyOptions,\n\tMessagePayload,\n\tSlashCommandSubcommandBuilder,\n} from \"discord.js\";\nimport { PermissionLevel, SubcommandMetadata } from \"src/shared/typings/index.js\";\nimport { TriviousClient } from \"src/index.js\";\n\n/**\n * Base SubcommandBuilder.\n *\n * @export\n * @class SubcommandBuilder\n * @typedef {SubcommandBuilder}\n * @extends {SlashCommandSubcommandBuilder}\n */\nexport class SubcommandBuilder extends SlashCommandSubcommandBuilder {\n\tprivate _active = true;\n\tprivate _ownerOnly = false;\n\tprivate _permission = PermissionLevel.USER;\n\tprivate _ephemeralReply = false;\n\n\t/**\n\t * Set the subcommand as disabled.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic disable(): this {\n\t\tthis._active = false;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the subcommand as owner only.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setOwnerOnly(): this {\n\t\tthis._permission = PermissionLevel.BOT_OWNER;\n\t\tthis._ownerOnly = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the permission level required to run the subcommand.\n\t *\n\t * @public\n\t * @param {PermissionLevel} permission\n\t * @returns {this}\n\t */\n\tpublic setPermission(permission: PermissionLevel): this {\n\t\tthis._permission = permission;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the interaction as ephemeral\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setEphemeralReply(): this {\n\t\tthis._ephemeralReply = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Build the builder.\n\t *\n\t * @public\n\t * @returns {{ data: SlashCommandSubcommandBuilder; metadata: SubcommandMetadata; }}\n\t */\n\tpublic build() {\n\t\treturn {\n\t\t\tdata: this as SlashCommandSubcommandBuilder,\n\t\t\tmetadata: {\n\t\t\t\tactive: this._active,\n\t\t\t\townerOnly: this._ownerOnly,\n\t\t\t\tpermission: this._permission,\n\t\t\t\tephemeralReply: this._ephemeralReply,\n\t\t\t} satisfies SubcommandMetadata,\n\t\t};\n\t}\n}\n\n/**\n * Base Subcommand\n *\n * @export\n * @abstract\n * @class Subcommand\n * @typedef {Subcommand}\n */\nexport default abstract class Subcommand {\n\tpublic readonly data: SlashCommandSubcommandBuilder;\n\tpublic readonly metadata: SubcommandMetadata;\n\n\tprotected constructor(builder: SubcommandBuilder) {\n\t\tconst { data, metadata } = builder.build();\n\t\tthis.data = data;\n\t\tthis.metadata = metadata;\n\t}\n\n\t/**\n\t * Function to execute the subcommand.\n\t *\n\t * @abstract\n\t * @readonly\n\t * @type {(\n\t * \t\tclient: TriviousClient,\n\t * \t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t * \t) => Promise<void>}\n\t */\n\tabstract readonly execute: (\n\t\tclient: TriviousClient,\n\t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t) => Promise<void>;\n\n\t/**\n\t * Reply to the interaction respecting command metadata and if the interaction has already been replied to.\n\t *\n\t * @async\n\t * @param {ChatInputCommandInteraction<CacheType>} interaction\n\t * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options\n\t * @returns {*}\n\t */\n\tasync reply(\n\t\tinteraction: ChatInputCommandInteraction<CacheType>,\n\t\toptions: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions\n\t) {\n\t\tif (interaction.replied || interaction.deferred) {\n\t\t\tawait interaction.editReply(options as InteractionEditReplyOptions);\n\t\t\treturn;\n\t\t}\n\n\t\tconst newOptions = { ...options } as InteractionReplyOptions;\n\t\tif (this.metadata.ephemeralReply) newOptions.flags = [\"Ephemeral\"];\n\n\t\tawait interaction.reply(newOptions);\n\t}\n}\n"]}
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { n as SubcommandBuilder, m as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { n as SubcommandBuilder, m as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { n as SubcommandBuilder, m as default } from '../../index-LB0d9s2b.js';
2
+ export { n as SubcommandBuilder, m as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -67,6 +67,13 @@ class SubcommandBuilder extends SlashCommandSubcommandBuilder {
67
67
  }
68
68
  }
69
69
  class Subcommand {
70
+ data;
71
+ metadata;
72
+ constructor(builder) {
73
+ const { data, metadata } = builder.build();
74
+ this.data = data;
75
+ this.metadata = metadata;
76
+ }
70
77
  /**
71
78
  * Reply to the interaction respecting command metadata and if the interaction has already been replied to.
72
79
  *
@@ -76,7 +83,7 @@ class Subcommand {
76
83
  * @returns {*}
77
84
  */
78
85
  async reply(interaction, options) {
79
- if (interaction.replied) {
86
+ if (interaction.replied || interaction.deferred) {
80
87
  await interaction.editReply(options);
81
88
  return;
82
89
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/commands/subcommand.base.ts"],"names":[],"mappings":";;;AAmBO,MAAM,0BAA0B,6BAAA,CAA8B;AAAA,EAC5D,OAAA,GAAU,IAAA;AAAA,EACV,UAAA,GAAa,KAAA;AAAA,EACb,cAAc,eAAA,CAAgB,IAAA;AAAA,EAC9B,eAAA,GAAkB,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnB,OAAA,GAAgB;AACtB,IAAA,IAAA,CAAK,OAAA,GAAU,KAAA;AACf,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,YAAA,GAAqB;AAC3B,IAAA,IAAA,CAAK,cAAc,eAAA,CAAgB,SAAA;AACnC,IAAA,IAAA,CAAK,UAAA,GAAa,IAAA;AAClB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,cAAc,UAAA,EAAmC;AACvD,IAAA,IAAA,CAAK,WAAA,GAAc,UAAA;AACnB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,iBAAA,GAA0B;AAChC,IAAA,IAAA,CAAK,eAAA,GAAkB,IAAA;AACvB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,KAAA,GAAQ;AACd,IAAA,OAAO;AAAA,MACN,IAAA,EAAM,IAAA;AAAA,MACN,QAAA,EAAU;AAAA,QACT,QAAQ,IAAA,CAAK,OAAA;AAAA,QACb,WAAW,IAAA,CAAK,UAAA;AAAA,QAChB,YAAY,IAAA,CAAK,WAAA;AAAA,QACjB,gBAAgB,IAAA,CAAK;AAAA;AACtB,KACD;AAAA,EACD;AACD;AAUA,MAAO,UAAA,CAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA0BxC,MAAM,KAAA,CACL,WAAA,EACA,OAAA,EACC;AACD,IAAA,IAAI,YAAY,OAAA,EAAS;AACxB,MAAA,MAAM,WAAA,CAAY,UAAU,OAAsC,CAAA;AAClE,MAAA;AAAA,IACD;AAEA,IAAA,MAAM,UAAA,GAAa,EAAE,GAAG,OAAA,EAAQ;AAChC,IAAA,IAAI,KAAK,QAAA,CAAS,cAAA,EAAgB,UAAA,CAAW,KAAA,GAAQ,CAAC,WAAW,CAAA;AAEjE,IAAA,MAAM,WAAA,CAAY,MAAM,UAAU,CAAA;AAAA,EACnC;AACD","file":"subcommand.base.js","sourcesContent":["import {\n\tCacheType,\n\tChatInputCommandInteraction,\n\tInteractionEditReplyOptions,\n\tInteractionReplyOptions,\n\tMessagePayload,\n\tSlashCommandSubcommandBuilder,\n} from \"discord.js\";\nimport { PermissionLevel, SubcommandMetadata } from \"src/shared/typings/index.js\";\nimport { TriviousClient } from \"src/index.js\";\n\n/**\n * Base SubcommandBuilder.\n *\n * @export\n * @class SubcommandBuilder\n * @typedef {SubcommandBuilder}\n * @extends {SlashCommandSubcommandBuilder}\n */\nexport class SubcommandBuilder extends SlashCommandSubcommandBuilder {\n\tprivate _active = true;\n\tprivate _ownerOnly = false;\n\tprivate _permission = PermissionLevel.USER;\n\tprivate _ephemeralReply = false;\n\n\t/**\n\t * Set the subcommand as disabled.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic disable(): this {\n\t\tthis._active = false;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the subcommand as owner only.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setOwnerOnly(): this {\n\t\tthis._permission = PermissionLevel.BOT_OWNER;\n\t\tthis._ownerOnly = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the permission level required to run the subcommand.\n\t *\n\t * @public\n\t * @param {PermissionLevel} permission\n\t * @returns {this}\n\t */\n\tpublic setPermission(permission: PermissionLevel): this {\n\t\tthis._permission = permission;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the interaction as ephemeral\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setEphemeralReply(): this {\n\t\tthis._ephemeralReply = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Build the builder.\n\t *\n\t * @public\n\t * @returns {{ data: SlashCommandSubcommandBuilder; metadata: SubcommandMetadata; }}\n\t */\n\tpublic build() {\n\t\treturn {\n\t\t\tdata: this as SlashCommandSubcommandBuilder,\n\t\t\tmetadata: {\n\t\t\t\tactive: this._active,\n\t\t\t\townerOnly: this._ownerOnly,\n\t\t\t\tpermission: this._permission,\n\t\t\t\tephemeralReply: this._ephemeralReply,\n\t\t\t} satisfies SubcommandMetadata,\n\t\t};\n\t}\n}\n\n/**\n * Base Subcommand\n *\n * @export\n * @abstract\n * @class Subcommand\n * @typedef {Subcommand}\n */\nexport default abstract class Subcommand {\n\tabstract data: SlashCommandSubcommandBuilder;\n\tabstract metadata: SubcommandMetadata;\n\t/**\n\t * Function to execute the subcommand.\n\t *\n\t * @abstract\n\t * @readonly\n\t * @type {(\n\t * \t\tclient: TriviousClient,\n\t * \t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t * \t) => Promise<void>}\n\t */\n\tabstract readonly execute: (\n\t\tclient: TriviousClient,\n\t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t) => Promise<void>;\n\n\t/**\n\t * Reply to the interaction respecting command metadata and if the interaction has already been replied to.\n\t *\n\t * @async\n\t * @param {ChatInputCommandInteraction<CacheType>} interaction\n\t * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options\n\t * @returns {*}\n\t */\n\tasync reply(\n\t\tinteraction: ChatInputCommandInteraction<CacheType>,\n\t\toptions: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions\n\t) {\n\t\tif (interaction.replied) {\n\t\t\tawait interaction.editReply(options as InteractionEditReplyOptions);\n\t\t\treturn;\n\t\t}\n\n\t\tconst newOptions = { ...options } as InteractionReplyOptions;\n\t\tif (this.metadata.ephemeralReply) newOptions.flags = [\"Ephemeral\"];\n\n\t\tawait interaction.reply(newOptions);\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../src/core/commands/subcommand.base.ts"],"names":[],"mappings":";;;AAmBO,MAAM,0BAA0B,6BAAA,CAA8B;AAAA,EAC5D,OAAA,GAAU,IAAA;AAAA,EACV,UAAA,GAAa,KAAA;AAAA,EACb,cAAc,eAAA,CAAgB,IAAA;AAAA,EAC9B,eAAA,GAAkB,KAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnB,OAAA,GAAgB;AACtB,IAAA,IAAA,CAAK,OAAA,GAAU,KAAA;AACf,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,YAAA,GAAqB;AAC3B,IAAA,IAAA,CAAK,cAAc,eAAA,CAAgB,SAAA;AACnC,IAAA,IAAA,CAAK,UAAA,GAAa,IAAA;AAClB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASO,cAAc,UAAA,EAAmC;AACvD,IAAA,IAAA,CAAK,WAAA,GAAc,UAAA;AACnB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,iBAAA,GAA0B;AAChC,IAAA,IAAA,CAAK,eAAA,GAAkB,IAAA;AACvB,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,KAAA,GAAQ;AACd,IAAA,OAAO;AAAA,MACN,IAAA,EAAM,IAAA;AAAA,MACN,QAAA,EAAU;AAAA,QACT,QAAQ,IAAA,CAAK,OAAA;AAAA,QACb,WAAW,IAAA,CAAK,UAAA;AAAA,QAChB,YAAY,IAAA,CAAK,WAAA;AAAA,QACjB,gBAAgB,IAAA,CAAK;AAAA;AACtB,KACD;AAAA,EACD;AACD;AAUA,MAAO,UAAA,CAAkC;AAAA,EACxB,IAAA;AAAA,EACA,QAAA;AAAA,EAEN,YAAY,OAAA,EAA4B;AACjD,IAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAS,GAAI,QAAQ,KAAA,EAAM;AACzC,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,QAAA,GAAW,QAAA;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyBA,MAAM,KAAA,CACL,WAAA,EACA,OAAA,EACC;AACD,IAAA,IAAI,WAAA,CAAY,OAAA,IAAW,WAAA,CAAY,QAAA,EAAU;AAChD,MAAA,MAAM,WAAA,CAAY,UAAU,OAAsC,CAAA;AAClE,MAAA;AAAA,IACD;AAEA,IAAA,MAAM,UAAA,GAAa,EAAE,GAAG,OAAA,EAAQ;AAChC,IAAA,IAAI,KAAK,QAAA,CAAS,cAAA,EAAgB,UAAA,CAAW,KAAA,GAAQ,CAAC,WAAW,CAAA;AAEjE,IAAA,MAAM,WAAA,CAAY,MAAM,UAAU,CAAA;AAAA,EACnC;AACD","file":"subcommand.base.js","sourcesContent":["import {\n\tCacheType,\n\tChatInputCommandInteraction,\n\tInteractionEditReplyOptions,\n\tInteractionReplyOptions,\n\tMessagePayload,\n\tSlashCommandSubcommandBuilder,\n} from \"discord.js\";\nimport { PermissionLevel, SubcommandMetadata } from \"src/shared/typings/index.js\";\nimport { TriviousClient } from \"src/index.js\";\n\n/**\n * Base SubcommandBuilder.\n *\n * @export\n * @class SubcommandBuilder\n * @typedef {SubcommandBuilder}\n * @extends {SlashCommandSubcommandBuilder}\n */\nexport class SubcommandBuilder extends SlashCommandSubcommandBuilder {\n\tprivate _active = true;\n\tprivate _ownerOnly = false;\n\tprivate _permission = PermissionLevel.USER;\n\tprivate _ephemeralReply = false;\n\n\t/**\n\t * Set the subcommand as disabled.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic disable(): this {\n\t\tthis._active = false;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the subcommand as owner only.\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setOwnerOnly(): this {\n\t\tthis._permission = PermissionLevel.BOT_OWNER;\n\t\tthis._ownerOnly = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the permission level required to run the subcommand.\n\t *\n\t * @public\n\t * @param {PermissionLevel} permission\n\t * @returns {this}\n\t */\n\tpublic setPermission(permission: PermissionLevel): this {\n\t\tthis._permission = permission;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the interaction as ephemeral\n\t *\n\t * @public\n\t * @returns {this}\n\t */\n\tpublic setEphemeralReply(): this {\n\t\tthis._ephemeralReply = true;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Build the builder.\n\t *\n\t * @public\n\t * @returns {{ data: SlashCommandSubcommandBuilder; metadata: SubcommandMetadata; }}\n\t */\n\tpublic build() {\n\t\treturn {\n\t\t\tdata: this as SlashCommandSubcommandBuilder,\n\t\t\tmetadata: {\n\t\t\t\tactive: this._active,\n\t\t\t\townerOnly: this._ownerOnly,\n\t\t\t\tpermission: this._permission,\n\t\t\t\tephemeralReply: this._ephemeralReply,\n\t\t\t} satisfies SubcommandMetadata,\n\t\t};\n\t}\n}\n\n/**\n * Base Subcommand\n *\n * @export\n * @abstract\n * @class Subcommand\n * @typedef {Subcommand}\n */\nexport default abstract class Subcommand {\n\tpublic readonly data: SlashCommandSubcommandBuilder;\n\tpublic readonly metadata: SubcommandMetadata;\n\n\tprotected constructor(builder: SubcommandBuilder) {\n\t\tconst { data, metadata } = builder.build();\n\t\tthis.data = data;\n\t\tthis.metadata = metadata;\n\t}\n\n\t/**\n\t * Function to execute the subcommand.\n\t *\n\t * @abstract\n\t * @readonly\n\t * @type {(\n\t * \t\tclient: TriviousClient,\n\t * \t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t * \t) => Promise<void>}\n\t */\n\tabstract readonly execute: (\n\t\tclient: TriviousClient,\n\t\tinteraction: ChatInputCommandInteraction<CacheType>\n\t) => Promise<void>;\n\n\t/**\n\t * Reply to the interaction respecting command metadata and if the interaction has already been replied to.\n\t *\n\t * @async\n\t * @param {ChatInputCommandInteraction<CacheType>} interaction\n\t * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options\n\t * @returns {*}\n\t */\n\tasync reply(\n\t\tinteraction: ChatInputCommandInteraction<CacheType>,\n\t\toptions: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions\n\t) {\n\t\tif (interaction.replied || interaction.deferred) {\n\t\t\tawait interaction.editReply(options as InteractionEditReplyOptions);\n\t\t\treturn;\n\t\t}\n\n\t\tconst newOptions = { ...options } as InteractionReplyOptions;\n\t\tif (this.metadata.ephemeralReply) newOptions.flags = [\"Ephemeral\"];\n\n\t\tawait interaction.reply(newOptions);\n\t}\n}\n"]}
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { x as ComponentBuilder, w as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { x as ComponentBuilder, w as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { x as ComponentBuilder, w as default } from '../../index-LB0d9s2b.js';
2
+ export { x as ComponentBuilder, w as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -1,6 +1,7 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../index-B7hbKkOJ.cjs';
2
+ import { T as TriviousClient } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
4
5
 
5
6
  declare const _default: {
6
7
  name: "clientReady";
@@ -1,6 +1,7 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../index-LB0d9s2b.js';
2
+ import { T as TriviousClient } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
4
5
 
5
6
  declare const _default: {
6
7
  name: "clientReady";
@@ -1,6 +1,7 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../index-B7hbKkOJ.cjs';
2
+ import { T as TriviousClient } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
4
5
 
5
6
  declare const _default: {
6
7
  name: "interactionCreate";
@@ -1,6 +1,7 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../index-LB0d9s2b.js';
2
+ import { T as TriviousClient } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
4
5
 
5
6
  declare const _default: {
6
7
  name: "interactionCreate";
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { C as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { C as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { C as default } from '../../index-LB0d9s2b.js';
2
+ export { C as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { a as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { a as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { a as default } from '../../index-LB0d9s2b.js';
2
+ export { a as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { E as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { E as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { E as default } from '../../index-LB0d9s2b.js';
2
+ export { E as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -1,6 +1,7 @@
1
- import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-B7hbKkOJ.cjs';
1
+ import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-ezMHiXmy.cjs';
2
2
  import '../../shared/typings/registry.cjs';
3
3
  import 'discord.js';
4
+ import '../builders/util.builders.cjs';
4
5
 
5
6
  /**
6
7
  * Create new registries.
@@ -1,6 +1,7 @@
1
- import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-LB0d9s2b.js';
1
+ import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-HF-OBZPh.js';
2
2
  import '../../shared/typings/registry.js';
3
3
  import 'discord.js';
4
+ import '../builders/util.builders.js';
4
5
 
5
6
  /**
6
7
  * Create new registries.
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { M as default } from '../../index-B7hbKkOJ.cjs';
2
+ export { M as default } from '../../index-ezMHiXmy.cjs';
3
3
  import '../../shared/typings/registry.cjs';
4
+ import '../builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { M as default } from '../../index-LB0d9s2b.js';
2
+ export { M as default } from '../../index-HF-OBZPh.js';
3
3
  import '../../shared/typings/registry.js';
4
+ import '../builders/util.builders.js';
@@ -1,6 +1,7 @@
1
1
  import { BaseRegistry } from './shared/typings/registry.js';
2
2
  import * as discord_js from 'discord.js';
3
3
  import { GuildMember, AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, ContextMenuCommandBuilder, Collection, MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions, SlashCommandSubcommandBuilder, ChatInputCommandInteraction as ChatInputCommandInteraction$1, ClientOptions, ClientEvents, ComponentType as ComponentType$1, Client, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
4
+ import './core/builders/util.builders.js';
4
5
 
5
6
  /**
6
7
  * User permission level enums
@@ -399,8 +400,9 @@ declare class SubcommandBuilder extends SlashCommandSubcommandBuilder {
399
400
  * @typedef {Subcommand}
400
401
  */
401
402
  declare abstract class Subcommand {
402
- abstract data: SlashCommandSubcommandBuilder;
403
- abstract metadata: SubcommandMetadata;
403
+ readonly data: SlashCommandSubcommandBuilder;
404
+ readonly metadata: SubcommandMetadata;
405
+ protected constructor(builder: SubcommandBuilder);
404
406
  /**
405
407
  * Function to execute the subcommand.
406
408
  *
@@ -1,6 +1,7 @@
1
1
  import { BaseRegistry } from './shared/typings/registry.cjs';
2
2
  import * as discord_js from 'discord.js';
3
3
  import { GuildMember, AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, ContextMenuCommandBuilder, Collection, MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions, SlashCommandSubcommandBuilder, ChatInputCommandInteraction as ChatInputCommandInteraction$1, ClientOptions, ClientEvents, ComponentType as ComponentType$1, Client, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
4
+ import './core/builders/util.builders.cjs';
4
5
 
5
6
  /**
6
7
  * User permission level enums
@@ -399,8 +400,9 @@ declare class SubcommandBuilder extends SlashCommandSubcommandBuilder {
399
400
  * @typedef {Subcommand}
400
401
  */
401
402
  declare abstract class Subcommand {
402
- abstract data: SlashCommandSubcommandBuilder;
403
- abstract metadata: SubcommandMetadata;
403
+ readonly data: SlashCommandSubcommandBuilder;
404
+ readonly metadata: SubcommandMetadata;
405
+ protected constructor(builder: SubcommandBuilder);
404
406
  /**
405
407
  * Function to execute the subcommand.
406
408
  *
package/dist/index.cjs CHANGED
@@ -8,6 +8,7 @@ var subcommand_base_js = require('./core/commands/subcommand.base.js');
8
8
  var command_registry_js = require('./core/registry/command.registry.js');
9
9
  var component_base_js = require('./core/components/component.base.js');
10
10
  var component_registry_js = require('./core/registry/component.registry.js');
11
+ var util_builders_js = require('./core/builders/util.builders.js');
11
12
  var index_js = require('./shared/typings/index.js');
12
13
 
13
14
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -69,6 +70,14 @@ Object.defineProperty(exports, "ComponentRegistry", {
69
70
  enumerable: true,
70
71
  get: function () { return component_registry_js__default.default; }
71
72
  });
73
+ Object.defineProperty(exports, "createActionRow", {
74
+ enumerable: true,
75
+ get: function () { return util_builders_js.createActionRow; }
76
+ });
77
+ Object.defineProperty(exports, "createEmbed", {
78
+ enumerable: true,
79
+ get: function () { return util_builders_js.createEmbed; }
80
+ });
72
81
  Object.keys(index_js).forEach(function (k) {
73
82
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
74
83
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, i as Command, j as CommandBuilder, o as CommandInteraction, p as CommandMetadata, C as CommandRegistry, w as Component, x as ComponentBuilder, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, a as ComponentRegistry, e as ComponentType, l as ContextMenuBuilder, k as ContextMenuCommand, F as ContextMenuCommandInteraction, r as ContextMenuMetadata, u as Event, D as ModalSubmitInteraction, v as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, m as Subcommand, n as SubcommandBuilder, q as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from './index-B7hbKkOJ.cjs';
2
+ export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, i as Command, j as CommandBuilder, o as CommandInteraction, p as CommandMetadata, C as CommandRegistry, w as Component, x as ComponentBuilder, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, a as ComponentRegistry, e as ComponentType, l as ContextMenuBuilder, k as ContextMenuCommand, F as ContextMenuCommandInteraction, r as ContextMenuMetadata, u as Event, D as ModalSubmitInteraction, v as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, m as Subcommand, n as SubcommandBuilder, q as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from './index-ezMHiXmy.cjs';
3
+ export { createActionRow, createEmbed } from './core/builders/util.builders.cjs';
3
4
  export { BaseRegistry } from './shared/typings/registry.cjs';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, i as Command, j as CommandBuilder, o as CommandInteraction, p as CommandMetadata, C as CommandRegistry, w as Component, x as ComponentBuilder, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, a as ComponentRegistry, e as ComponentType, l as ContextMenuBuilder, k as ContextMenuCommand, F as ContextMenuCommandInteraction, r as ContextMenuMetadata, u as Event, D as ModalSubmitInteraction, v as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, m as Subcommand, n as SubcommandBuilder, q as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from './index-LB0d9s2b.js';
2
+ export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, i as Command, j as CommandBuilder, o as CommandInteraction, p as CommandMetadata, C as CommandRegistry, w as Component, x as ComponentBuilder, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, a as ComponentRegistry, e as ComponentType, l as ContextMenuBuilder, k as ContextMenuCommand, F as ContextMenuCommandInteraction, r as ContextMenuMetadata, u as Event, D as ModalSubmitInteraction, v as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, m as Subcommand, n as SubcommandBuilder, q as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from './index-HF-OBZPh.js';
3
+ export { createActionRow, createEmbed } from './core/builders/util.builders.js';
3
4
  export { BaseRegistry } from './shared/typings/registry.js';
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ export { default as Subcommand, SubcommandBuilder } from './core/commands/subcom
6
6
  export { default as CommandRegistry } from './core/registry/command.registry.js';
7
7
  export { default as Component, ComponentBuilder } from './core/components/component.base.js';
8
8
  export { default as ComponentRegistry } from './core/registry/component.registry.js';
9
+ export { createActionRow, createEmbed } from './core/builders/util.builders.js';
9
10
  export * from './shared/typings/index.js';
10
11
  //# sourceMappingURL=index.js.map
11
12
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { b as TriviousClientOptions } from '../../index-B7hbKkOJ.cjs';
2
+ export { b as TriviousClientOptions } from '../../index-ezMHiXmy.cjs';
3
3
  import './registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { b as TriviousClientOptions } from '../../index-LB0d9s2b.js';
2
+ export { b as TriviousClientOptions } from '../../index-HF-OBZPh.js';
3
3
  import './registry.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,3 +1,4 @@
1
- export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, r as ContextMenuMetadata, q as SubcommandMetadata } from '../../index-B7hbKkOJ.cjs';
1
+ export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, r as ContextMenuMetadata, q as SubcommandMetadata } from '../../index-ezMHiXmy.cjs';
2
2
  import 'discord.js';
3
3
  import './registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
- export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, r as ContextMenuMetadata, q as SubcommandMetadata } from '../../index-LB0d9s2b.js';
1
+ export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, r as ContextMenuMetadata, q as SubcommandMetadata } from '../../index-HF-OBZPh.js';
2
2
  import 'discord.js';
3
3
  import './registry.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, h as deconstructCustomId } from '../../index-B7hbKkOJ.cjs';
2
+ export { c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, h as deconstructCustomId } from '../../index-ezMHiXmy.cjs';
3
3
  import './registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, h as deconstructCustomId } from '../../index-LB0d9s2b.js';
2
+ export { c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, h as deconstructCustomId } from '../../index-HF-OBZPh.js';
3
3
  import './registry.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { u as Event } from '../../index-B7hbKkOJ.cjs';
2
+ export { u as Event } from '../../index-ezMHiXmy.cjs';
3
3
  import './registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { u as Event } from '../../index-LB0d9s2b.js';
2
+ export { u as Event } from '../../index-HF-OBZPh.js';
3
3
  import './registry.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,3 +1,4 @@
1
- export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, r as ContextMenuMetadata, u as Event, v as Module, P as PermissionLevel, q as SubcommandMetadata, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from '../../index-B7hbKkOJ.cjs';
1
+ export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, r as ContextMenuMetadata, u as Event, v as Module, P as PermissionLevel, q as SubcommandMetadata, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from '../../index-ezMHiXmy.cjs';
2
2
  export { BaseRegistry } from './registry.cjs';
3
3
  import 'discord.js';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
- export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, r as ContextMenuMetadata, u as Event, v as Module, P as PermissionLevel, q as SubcommandMetadata, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from '../../index-LB0d9s2b.js';
1
+ export { A as AnyCommand, s as AnyCommandBuilder, t as AnyCommandMetadata, o as CommandInteraction, p as CommandMetadata, c as ComponentCustomIdTag, d as ComponentInteraction, f as ComponentMetadata, e as ComponentType, r as ContextMenuMetadata, u as Event, v as Module, P as PermissionLevel, q as SubcommandMetadata, b as TriviousClientOptions, h as deconstructCustomId, g as getPermissionLevel } from '../../index-HF-OBZPh.js';
2
2
  export { BaseRegistry } from './registry.js';
3
3
  import 'discord.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { v as Module } from '../../index-B7hbKkOJ.cjs';
2
+ export { v as Module } from '../../index-ezMHiXmy.cjs';
3
3
  import './registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { v as Module } from '../../index-LB0d9s2b.js';
2
+ export { v as Module } from '../../index-HF-OBZPh.js';
3
3
  import './registry.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { P as PermissionLevel, g as getPermissionLevel } from '../../index-B7hbKkOJ.cjs';
2
+ export { P as PermissionLevel, g as getPermissionLevel } from '../../index-ezMHiXmy.cjs';
3
3
  import './registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
@@ -1,3 +1,4 @@
1
1
  import 'discord.js';
2
- export { P as PermissionLevel, g as getPermissionLevel } from '../../index-LB0d9s2b.js';
2
+ export { P as PermissionLevel, g as getPermissionLevel } from '../../index-HF-OBZPh.js';
3
3
  import './registry.js';
4
+ import '../../core/builders/util.builders.js';
@@ -1,6 +1,7 @@
1
- import { T as TriviousClient, P as PermissionLevel } from '../../index-B7hbKkOJ.cjs';
1
+ import { T as TriviousClient, P as PermissionLevel } from '../../index-ezMHiXmy.cjs';
2
2
  import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
3
3
  import '../typings/registry.cjs';
4
+ import '../../core/builders/util.builders.cjs';
4
5
 
5
6
  /**
6
7
  * Framework package root.
@@ -1,6 +1,7 @@
1
- import { T as TriviousClient, P as PermissionLevel } from '../../index-LB0d9s2b.js';
1
+ import { T as TriviousClient, P as PermissionLevel } from '../../index-HF-OBZPh.js';
2
2
  import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
3
3
  import '../typings/registry.js';
4
+ import '../../core/builders/util.builders.js';
4
5
 
5
6
  /**
6
7
  * Framework package root.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trivious",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "discord-bot",