trivious 1.6.1 → 1.6.3

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 (30) hide show
  1. package/dist/core/client/trivious.client.d.ts +1 -2
  2. package/dist/core/commands/methods.command.d.ts +1 -2
  3. package/dist/core/events/clientReady.d.ts +2 -2
  4. package/dist/core/events/clientReady.js +1 -0
  5. package/dist/core/events/clientReady.js.map +1 -1
  6. package/dist/core/events/interactionCreate.d.ts +1 -2
  7. package/dist/core/registry/command.registry.d.ts +1 -2
  8. package/dist/core/registry/command.registry.js +1 -1
  9. package/dist/core/registry/command.registry.js.map +1 -1
  10. package/dist/core/registry/component.registry.d.ts +1 -2
  11. package/dist/core/registry/component.registry.js +2 -2
  12. package/dist/core/registry/component.registry.js.map +1 -1
  13. package/dist/core/registry/event.registry.d.ts +1 -2
  14. package/dist/core/registry/index.d.ts +1 -2
  15. package/dist/core/registry/module.registry.d.ts +1 -2
  16. package/dist/{index-BqxT-x7T.d.ts → index-C2iWCQmv.d.ts} +65 -30
  17. package/dist/index.d.ts +1 -2
  18. package/dist/shared/typings/commands.d.ts +1 -2
  19. package/dist/shared/typings/components.d.ts +6 -40
  20. package/dist/shared/typings/components.js.map +1 -1
  21. package/dist/shared/typings/events.d.ts +1 -2
  22. package/dist/shared/typings/index.d.ts +1 -2
  23. package/dist/shared/typings/module.d.ts +1 -2
  24. package/dist/shared/utility/components.utility.d.ts +5 -1
  25. package/dist/shared/utility/functions.d.ts +1 -2
  26. package/dist/shared/utility/permissions.utility.d.ts +1 -2
  27. package/package.json +1 -1
  28. package/dist/core/components/component.base.d.ts +0 -7
  29. package/dist/core/components/component.base.js +0 -3
  30. package/dist/core/components/component.base.js.map +0 -1
@@ -1,7 +1,6 @@
1
- export { T as default } from '../../index-BqxT-x7T.js';
1
+ export { T as default } from '../../index-C2iWCQmv.js';
2
2
  import 'discord.js';
3
3
  import '../../shared/typings/permissions.js';
4
4
  import '../../shared/typings/client.js';
5
5
  import '../../shared/typings/registry.js';
6
- import '../../shared/typings/components.js';
7
6
  import '../builders/util.builders.js';
@@ -1,8 +1,7 @@
1
1
  import { MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions } from 'discord.js';
2
- import { C as Command, a as ChatInputCommandInteraction, b as ContextMenuCommandInteraction, T as TriviousClient, S as SlashCommand } from '../../index-BqxT-x7T.js';
2
+ import { C as Command, a as ChatInputCommandInteraction, b as ContextMenuCommandInteraction, T as TriviousClient, S as SlashCommand } from '../../index-C2iWCQmv.js';
3
3
  import { PermissionLevel } from '../../shared/typings/permissions.js';
4
4
  import '../../shared/typings/registry.js';
5
- import '../../shared/typings/components.js';
6
5
  import '../../shared/typings/client.js';
7
6
  import '../builders/util.builders.js';
8
7
 
@@ -1,13 +1,13 @@
1
1
  import * as discord_js from 'discord.js';
2
- import { T as TriviousClient } from '../../index-BqxT-x7T.js';
2
+ import { T as TriviousClient } from '../../index-C2iWCQmv.js';
3
3
  import '../../shared/typings/permissions.js';
4
4
  import '../../shared/typings/registry.js';
5
- import '../../shared/typings/components.js';
6
5
  import '../../shared/typings/client.js';
7
6
  import '../builders/util.builders.js';
8
7
 
9
8
  declare const _default: {
10
9
  name: "clientReady";
10
+ once: true;
11
11
  execute: (client: TriviousClient, _: discord_js.Client<true>) => Promise<void>;
12
12
  };
13
13
 
@@ -1,5 +1,6 @@
1
1
  var clientReady_default = {
2
2
  name: "clientReady",
3
+ once: true,
3
4
  execute: async (client, _) => {
4
5
  console.log(`Successfully logged into ${client.user?.username}`);
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/events/clientReady.ts"],"names":[],"mappings":"AAEA,IAAO,mBAAA,GAAQ;AAAA,EACd,IAAA,EAAM,aAAA;AAAA,EACN,OAAA,EAAS,OAAO,MAAA,EAAQ,CAAA,KAAM;AAC7B,IAAA,OAAA,CAAQ,GAAA,CAAI,CAAA,yBAAA,EAA4B,MAAA,CAAO,IAAA,EAAM,QAAQ,CAAA,CAAE,CAAA;AAAA,EAChE;AACD","file":"clientReady.js","sourcesContent":["import { Event } from \"src/shared/typings/index.js\";\n\nexport default {\n\tname: \"clientReady\",\n\texecute: async (client, _) => {\n\t\tconsole.log(`Successfully logged into ${client.user?.username}`);\n\t},\n} satisfies Event<\"clientReady\">;\n"]}
1
+ {"version":3,"sources":["../../../src/core/events/clientReady.ts"],"names":[],"mappings":"AAEA,IAAO,mBAAA,GAAQ;AAAA,EACd,IAAA,EAAM,aAAA;AAAA,EACN,IAAA,EAAM,IAAA;AAAA,EACN,OAAA,EAAS,OAAO,MAAA,EAAQ,CAAA,KAAM;AAC7B,IAAA,OAAA,CAAQ,GAAA,CAAI,CAAA,yBAAA,EAA4B,MAAA,CAAO,IAAA,EAAM,QAAQ,CAAA,CAAE,CAAA;AAAA,EAChE;AACD","file":"clientReady.js","sourcesContent":["import { Event } from \"src/shared/typings/index.js\";\n\nexport default {\n\tname: \"clientReady\",\n\tonce: true,\n\texecute: async (client, _) => {\n\t\tconsole.log(`Successfully logged into ${client.user?.username}`);\n\t},\n} satisfies Event<\"clientReady\">;\n"]}
@@ -1,9 +1,8 @@
1
1
  import * as discord_js from 'discord.js';
2
2
  import { CacheType } from 'discord.js';
3
- import { T as TriviousClient } from '../../index-BqxT-x7T.js';
3
+ import { T as TriviousClient } from '../../index-C2iWCQmv.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/registry.js';
6
- import '../../shared/typings/components.js';
7
6
  import '../../shared/typings/client.js';
8
7
  import '../builders/util.builders.js';
9
8
 
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { c as default } from '../../index-BqxT-x7T.js';
3
+ export { c as default } from '../../index-C2iWCQmv.js';
4
4
  import '../../shared/typings/permissions.js';
5
- import '../../shared/typings/components.js';
6
5
  import '../../shared/typings/client.js';
7
6
  import '../builders/util.builders.js';
@@ -29,7 +29,7 @@ class CommandRegistry extends BaseRegistry {
29
29
  else continue;
30
30
  const command = await this.importFile(commandFile);
31
31
  if (!command || !command.active || !("data" in command)) continue;
32
- if ("subcommands" in command) {
32
+ if (command.context === "SlashCommand") {
33
33
  const subcommandFiles = (await promises.readdir(fullPath)).filter(
34
34
  (file) => (file.endsWith(".ts") || file.endsWith(".js")) && !file.startsWith("index.") && !file.endsWith(".d.ts")
35
35
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/registry/command.registry.ts"],"names":["fs"],"mappings":";;;;;;AAoBA,MAAO,wBAAsC,YAAA,CAAsB;AAAA,EACxD,KAAA,GAAQ,IAAI,UAAA,EAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,KAAK,SAAA,GAAoB,eAAA,CAAgB,KAAK,IAAA,CAAK,KAAA,EAAO,UAAU,CAAC,CAAA,EAAG;AAC7E,IAAA,IAAI,CAAE,MAAM,MAAA,CAAO,SAAS,CAAA,EAAI;AAC/B,MAAA,OAAO,IAAA;AAAA,IACR;AAEA,IAAA,MAAM,OAAA,GAAU,MAAMA,QAAA,CAAG,OAAA,CAAQ,WAAW,EAAE,aAAA,EAAe,MAAM,CAAA;AAEnE,IAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC5B,MAAA,MAAM,QAAA,GAAW,IAAA,CAAK,SAAA,EAAW,KAAA,CAAM,IAAI,CAAA;AAC3C,MAAA,IAAI,CAAC,KAAA,CAAM,WAAA,EAAY,EAAG;AAE1B,MAAA,MAAM,SAAA,GAAY,IAAA,CAAK,QAAA,EAAU,UAAU,CAAA;AAC3C,MAAA,MAAM,OAAA,GAAU,IAAA,CAAK,QAAA,EAAU,UAAU,CAAA;AAEzC,MAAA,IAAI,WAAA,GAAc,EAAA;AAClB,MAAA,IAAI,MAAM,MAAA,CAAO,SAAS,CAAA,EAAG,WAAA,GAAc,SAAA;AAAA,WAAA,IAClC,MAAM,MAAA,CAAO,OAAO,CAAA,EAAG,WAAA,GAAc,OAAA;AAAA,WACz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andBuilder } from \"discord.js\";\nimport {\n\tBaseRegistry,\n\tCommand,\n\tContextMenuCommand,\n\tSlashCommand,\n\tSlashSubcommand,\n} from \"src/shared/typings/index.js\";\nimport { exists, resolveUserPath } from \"src/shared/utility/functions.js\";\nimport { promises as fs } from \"fs\";\nimport path, { join } from \"node:path\";\n\n/**\n * Registry to load and get all commands.\n *\n * @export\n * @class CommandRegistry\n * @typedef {CommandRegistry}\n * @extends {BaseRegistry<AnyCommand>}\n */\nexport default class CommandRegistry extends BaseRegistry<Command> {\n\tprotected items = new Collection<string, Command>();\n\n\t/**\n\t * Load all commands and their subcommands\n\t *\n\t * @async\n\t * @param {string} [directory=getCorePath({ coreDirectory: \"commands\" })]\n\t * @returns {unknown}\n\t */\n\tasync load(directory: string = resolveUserPath(path.join(\"src\", \"commands\"))) {\n\t\tif (!(await exists(directory))) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst entries = await fs.readdir(directory, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst fullPath = join(directory, entry.name);\n\t\t\tif (!entry.isDirectory()) continue;\n\n\t\t\tconst indexFile = join(fullPath, \"index.ts\");\n\t\t\tconst indexJs = join(fullPath, \"index.js\");\n\n\t\t\tlet commandFile = \"\";\n\t\t\tif (await exists(indexFile)) commandFile = indexFile;\n\t\t\telse if (await exists(indexJs)) commandFile = indexJs;\n\t\t\telse continue;\n\n\t\t\tconst command = (await this.importFile<Command>(commandFile)) as\n\t\t\t\t| SlashCommand\n\t\t\t\t| ContextMenuCommand\n\t\t\t\t| null;\n\t\t\tif (!command || !command.active || !(\"data\" in command)) continue;\n\n\t\t\tif (\"subcommands\" in command) {\n\t\t\t\tconst subcommandFiles = (await fs.readdir(fullPath)).filter(\n\t\t\t\t\tfile =>\n\t\t\t\t\t\t(file.endsWith(\".ts\") || file.endsWith(\".js\")) &&\n\t\t\t\t\t\t!file.startsWith(\"index.\") &&\n\t\t\t\t\t\t!file.endsWith(\".d.ts\")\n\t\t\t\t);\n\n\t\t\t\tfor (const file of subcommandFiles) {\n\t\t\t\t\tconst subcommand = await this.importFile<SlashSubcommand>(join(fullPath, file));\n\t\t\t\t\tif (!subcommand) continue;\n\t\t\t\t\tif (!subcommand.data.name || !(subcommand.data instanceof SlashCommandSubcommandBuilder))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif (!command.subcommands) command.subcommands = new Collection<string, SlashSubcommand>();\n\t\t\t\t\tcommand.subcommands.set(subcommand.data.name, subcommand);\n\t\t\t\t\tcommand.data.addSubcommand(subcommand.data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.items.set(command.data.name, command);\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../src/core/registry/command.registry.ts"],"names":["fs"],"mappings":";;;;;;AAoBA,MAAO,wBAAsC,YAAA,CAAsB;AAAA,EACxD,KAAA,GAAQ,IAAI,UAAA,EAA4B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASlD,MAAM,KAAK,SAAA,GAAoB,eAAA,CAAgB,KAAK,IAAA,CAAK,KAAA,EAAO,UAAU,CAAC,CAAA,EAAG;AAC7E,IAAA,IAAI,CAAE,MAAM,MAAA,CAAO,SAAS,CAAA,EAAI;AAC/B,MAAA,OAAO,IAAA;AAAA,IACR;AAEA,IAAA,MAAM,OAAA,GAAU,MAAMA,QAAA,CAAG,OAAA,CAAQ,WAAW,EAAE,aAAA,EAAe,MAAM,CAAA;AAEnE,IAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC5B,MAAA,MAAM,QAAA,GAAW,IAAA,CAAK,SAAA,EAAW,KAAA,CAAM,IAAI,CAAA;AAC3C,MAAA,IAAI,CAAC,KAAA,CAAM,WAAA,EAAY,EAAG;AAE1B,MAAA,MAAM,SAAA,GAAY,IAAA,CAAK,QAAA,EAAU,UAAU,CAAA;AAC3C,MAAA,MAAM,OAAA,GAAU,IAAA,CAAK,QAAA,EAAU,UAAU,CAA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,QAC3C;AAAA,MACD;AAEA,MAAA,IAAA,CAAK,KAAA,CAAM,GAAA,CAAI,OAAA,CAAQ,IAAA,CAAK,MAAM,OAAO,CAAA;AAAA,IAC1C;AAEA,IAAA,OAAO,IAAA;AAAA,EACR;AACD","file":"command.registry.js","sourcesContent":["import { Collection, SlashCommandSubcommandBuilder } from \"discord.js\";\nimport {\n\tBaseRegistry,\n\tCommand,\n\tContextMenuCommand,\n\tSlashCommand,\n\tSlashSubcommand,\n} from \"src/shared/typings/index.js\";\nimport { exists, resolveUserPath } from \"src/shared/utility/functions.js\";\nimport { promises as fs } from \"fs\";\nimport path, { join } from \"node:path\";\n\n/**\n * Registry to load and get all commands.\n *\n * @export\n * @class CommandRegistry\n * @typedef {CommandRegistry}\n * @extends {BaseRegistry<AnyCommand>}\n */\nexport default class CommandRegistry extends BaseRegistry<Command> {\n\tprotected items = new Collection<string, Command>();\n\n\t/**\n\t * Load all commands and their subcommands\n\t *\n\t * @async\n\t * @param {string} [directory=getCorePath({ coreDirectory: \"commands\" })]\n\t * @returns {unknown}\n\t */\n\tasync load(directory: string = resolveUserPath(path.join(\"src\", \"commands\"))) {\n\t\tif (!(await exists(directory))) {\n\t\t\treturn this;\n\t\t}\n\n\t\tconst entries = await fs.readdir(directory, { withFileTypes: true });\n\n\t\tfor (const entry of entries) {\n\t\t\tconst fullPath = join(directory, entry.name);\n\t\t\tif (!entry.isDirectory()) continue;\n\n\t\t\tconst indexFile = join(fullPath, \"index.ts\");\n\t\t\tconst indexJs = join(fullPath, \"index.js\");\n\n\t\t\tlet commandFile = \"\";\n\t\t\tif (await exists(indexFile)) commandFile = indexFile;\n\t\t\telse if (await exists(indexJs)) commandFile = indexJs;\n\t\t\telse continue;\n\n\t\t\tconst command = (await this.importFile<Command>(commandFile)) as\n\t\t\t\t| SlashCommand\n\t\t\t\t| ContextMenuCommand\n\t\t\t\t| null;\n\t\t\tif (!command || !command.active || !(\"data\" in command)) continue;\n\n\t\t\tif (command.context === \"SlashCommand\") {\n\t\t\t\tconst subcommandFiles = (await fs.readdir(fullPath)).filter(\n\t\t\t\t\tfile =>\n\t\t\t\t\t\t(file.endsWith(\".ts\") || file.endsWith(\".js\")) &&\n\t\t\t\t\t\t!file.startsWith(\"index.\") &&\n\t\t\t\t\t\t!file.endsWith(\".d.ts\")\n\t\t\t\t);\n\n\t\t\t\tfor (const file of subcommandFiles) {\n\t\t\t\t\tconst subcommand = await this.importFile<SlashSubcommand>(join(fullPath, file));\n\t\t\t\t\tif (!subcommand) continue;\n\t\t\t\t\tif (!subcommand.data.name || !(subcommand.data instanceof SlashCommandSubcommandBuilder))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif (!command.subcommands) command.subcommands = new Collection<string, SlashSubcommand>();\n\t\t\t\t\tcommand.subcommands.set(subcommand.data.name, subcommand);\n\t\t\t\t\tcommand.data.addSubcommand(subcommand.data);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.items.set(command.data.name, command);\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { d as default } from '../../index-BqxT-x7T.js';
3
+ export { d as default } from '../../index-C2iWCQmv.js';
4
4
  import '../../shared/typings/permissions.js';
5
- import '../../shared/typings/components.js';
6
5
  import '../../shared/typings/client.js';
7
6
  import '../builders/util.builders.js';
@@ -10,10 +10,10 @@ class ComponentRegistry extends BaseRegistry {
10
10
  * Load all components.
11
11
  *
12
12
  * @async
13
- * @param {string} [directory=getCorePath({ coreDirectory: "events" })]
13
+ * @param {string} [directory=getCorePath({ coreDirectory: "components" })]
14
14
  * @returns {Promise<this>}
15
15
  */
16
- async load(directory = resolveUserPath(path.join("src", "events"))) {
16
+ async load(directory = resolveUserPath(path.join("src", "components"))) {
17
17
  if (!await exists(directory)) return this;
18
18
  const entries = await promises.readdir(directory, { withFileTypes: true });
19
19
  for (const entry of entries) {
@@ -1 +1 @@
1
- {"version":3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AAA;AAAA,EACR;AACD","file":"component.registry.js","sourcesContent":["import { Collection } from \"discord.js\";\nimport { BaseRegistry } from \"src/shared/typings/index.js\";\nimport { exists, resolveUserPath } from \"src/shared/utility/functions.js\";\nimport { promises as fs } from \"fs\";\nimport path, { join } from \"node:path\";\nimport { Component } from \"../components/component.base.js\";\n\n/**\n * Registry to load and get all components.\n *\n * @export\n * @class ComponentRegistry\n * @typedef {ComponentRegistry}\n * @extends {BaseRegistry<Component>}\n */\nexport default class ComponentRegistry extends BaseRegistry<Component> {\n\tprotected items = new Collection<string, Component>();\n\n\t/**\n\t * Load all components.\n\t *\n\t * @async\n\t * @param {string} [directory=getCorePath({ coreDirectory: \"events\" })]\n\t * @returns {Promise<this>}\n\t */\n\tasync load(directory: string = resolveUserPath(path.join(\"src\", \"events\"))): Promise<this> {\n\t\tif (!(await exists(directory))) return this;\n\n\t\tconst entries = await fs.readdir(directory, { withFileTypes: true });\n\t\tfor (const entry of entries) {\n\t\t\tconst fullPath = join(directory, entry.name);\n\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tawait this.load(fullPath);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (entry.isFile() && entry.name.endsWith(\".js\")) {\n\t\t\t\tconst event = await this.importFile<Component>(fullPath);\n\t\t\t\tif (!event) continue;\n\n\t\t\t\tif (!(event.customId || event.customIdData)) {\n\t\t\t\t\tconsole.error(`Component from ${entry.name} does not return customId nor customIdData!`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.items.set((event.customId || event.customIdData) as string, event);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../../src/core/registry/component.registry.ts"],"names":["fs"],"mappings":";;;;;;AAcA,MAAO,0BAAwC,YAAA,CAAwB;AAAA,EAC5D,KAAA,GAAQ,IAAI,UAAA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpD,MAAM,KAAK,SAAA,GAAoB,eAAA,CAAgB,KAAK,IAAA,CAAK,KAAA,EAAO,YAAY,CAAC,CAAA,EAAkB;AAC9F,IAAA,IAAI,CAAE,MAAM,MAAA,CAAO,SAAS,GAAI,OAAO,IAAA;AAEvC,IAAA,MAAM,OAAA,GAAU,MAAMA,QAAA,CAAG,OAAA,CAAQ,WAAW,EAAE,aAAA,EAAe,MAAM,CAAA;AACnE,IAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC5B,MAAA,MAAM,QAAA,GAAW,IAAA,CAAK,SAAA,EAAW,KAAA,CAAM,IAAI,CAAA;AAE3C,MAAA,IAAI,KAAA,CAAM,aAAY,EAAG;AACxB,QAAA,MAAM,IAAA,CAAK,KAAK,QAAQ,CAAA;AACxB,QAAA;AAAA,MACD;AAEA,MAAA,IAAI,MAAM,MAAA,EAAO,IAAK,MAAM,IAAA,CAAK,QAAA,CAAS,KAAK,CAAA,EAAG;AACjD,QAAA,MAAM,KAAA,GAAQ,MAAM,IAAA,CAAK,UAAA,CAAsB,QAAQ,CAAA;AACvD,QAAA,IAAI,CAAC,KAAA,EAAO;AAEZ,QAAA,IAAI,EAAE,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,YAAA,CAAA,EAAe;AAC5C,UAAA,OAAA,CAAQ,KAAA,CAAM,CAAA,eAAA,EAAkB,KAAA,CAAM,IAAI,CAAA,2CAAA,CAA6C,CAAA;AACvF,UAAA;AAAA,QACD;AAEA,QAAA,IAAA,CAAK,MAAM,GAAA,CAAK,KAAA,CAAM,QAAA,IAAY,KAAA,CAAM,cAAyB,KAAK,CAAA;AAAA,MACvE;AAAA,IACD;AAEA,IAAA,OAAO,IAAA;AAAA,EACR;AACD","file":"component.registry.js","sourcesContent":["import { Collection } from \"discord.js\";\nimport { BaseRegistry, Component } from \"src/shared/typings/index.js\";\nimport { exists, resolveUserPath } from \"src/shared/utility/functions.js\";\nimport { promises as fs } from \"fs\";\nimport path, { join } from \"node:path\";\n\n/**\n * Registry to load and get all components.\n *\n * @export\n * @class ComponentRegistry\n * @typedef {ComponentRegistry}\n * @extends {BaseRegistry<Component>}\n */\nexport default class ComponentRegistry extends BaseRegistry<Component> {\n\tprotected items = new Collection<string, Component>();\n\n\t/**\n\t * Load all components.\n\t *\n\t * @async\n\t * @param {string} [directory=getCorePath({ coreDirectory: \"components\" })]\n\t * @returns {Promise<this>}\n\t */\n\tasync load(directory: string = resolveUserPath(path.join(\"src\", \"components\"))): Promise<this> {\n\t\tif (!(await exists(directory))) return this;\n\n\t\tconst entries = await fs.readdir(directory, { withFileTypes: true });\n\t\tfor (const entry of entries) {\n\t\t\tconst fullPath = join(directory, entry.name);\n\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tawait this.load(fullPath);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (entry.isFile() && entry.name.endsWith(\".js\")) {\n\t\t\t\tconst event = await this.importFile<Component>(fullPath);\n\t\t\t\tif (!event) continue;\n\n\t\t\t\tif (!(event.customId || event.customIdData)) {\n\t\t\t\t\tconsole.error(`Component from ${entry.name} does not return customId nor customIdData!`);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.items.set((event.customId || event.customIdData) as string, event);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { E as default } from '../../index-BqxT-x7T.js';
3
+ export { E as default } from '../../index-C2iWCQmv.js';
4
4
  import '../../shared/typings/permissions.js';
5
- import '../../shared/typings/components.js';
6
5
  import '../../shared/typings/client.js';
7
6
  import '../builders/util.builders.js';
@@ -1,9 +1,8 @@
1
1
  import { TriviousClientOptions } from '../../shared/typings/client.js';
2
- import { c as CommandRegistry, d as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, T as TriviousClient } from '../../index-BqxT-x7T.js';
2
+ import { c as CommandRegistry, d as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, T as TriviousClient } from '../../index-C2iWCQmv.js';
3
3
  import 'discord.js';
4
4
  import '../../shared/typings/permissions.js';
5
5
  import '../../shared/typings/registry.js';
6
- import '../../shared/typings/components.js';
7
6
  import '../builders/util.builders.js';
8
7
 
9
8
  /**
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
2
  import '../../shared/typings/registry.js';
3
- export { M as default } from '../../index-BqxT-x7T.js';
3
+ export { M as default } from '../../index-C2iWCQmv.js';
4
4
  import '../../shared/typings/permissions.js';
5
- import '../../shared/typings/components.js';
6
5
  import '../../shared/typings/client.js';
7
6
  import '../builders/util.builders.js';
@@ -1,10 +1,71 @@
1
1
  import { PermissionLevel } from './shared/typings/permissions.js';
2
2
  import { BaseRegistry } from './shared/typings/registry.js';
3
- import { ComponentInteraction } from './shared/typings/components.js';
4
3
  import { TriviousClientOptions } from './shared/typings/client.js';
5
- import { SlashCommandBuilder, Collection, SlashCommandSubcommandBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, CacheType, UserContextMenuCommandInteraction, ClientEvents, ComponentType, Client, ChatInputCommandInteraction as ChatInputCommandInteraction$1, ButtonInteraction as ButtonInteraction$1, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
4
+ import { AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, Collection, SlashCommandSubcommandBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, ClientEvents, Client, ChatInputCommandInteraction as ChatInputCommandInteraction$1, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
6
5
  import './core/builders/util.builders.js';
7
6
 
7
+ /**
8
+ * Base component interface.
9
+ *
10
+ * @export
11
+ * @interface Component
12
+ * @typedef {Component}
13
+ */
14
+ interface Component {
15
+ component: ComponentType;
16
+ permission: PermissionLevel;
17
+ /**
18
+ * The full constructed customId.
19
+ *
20
+ * @type {?string}
21
+ */
22
+ customId?: string;
23
+ /**
24
+ * The 'data' part of a constructed customId.
25
+ *
26
+ * @type {?string}
27
+ */
28
+ customIdData?: string;
29
+ ephemeralReply?: boolean;
30
+ execute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void> | void;
31
+ }
32
+ /**
33
+ * Tags for component customIds.
34
+ *
35
+ * @export
36
+ * @typedef {ComponentCustomIdTag}
37
+ */
38
+ type ComponentCustomIdTag = "awaited";
39
+ /**
40
+ * Interaction types for components.
41
+ *
42
+ * @export
43
+ * @typedef {ComponentInteraction}
44
+ */
45
+ type ComponentInteraction = AnySelectMenuInteraction<CacheType> | ButtonInteraction$1<CacheType> | ModalSubmitInteraction$1<CacheType>;
46
+ /**
47
+ * What type of component is the componenty.
48
+ *
49
+ * @export
50
+ * @enum {number}
51
+ */
52
+ declare enum ComponentType {
53
+ Button = "button",
54
+ SelectMenu = "select",
55
+ Modal = "modal"
56
+ }
57
+ /**
58
+ * Component customId construct options.
59
+ *
60
+ * @export
61
+ * @typedef {CustomIdConstructOptions}
62
+ */
63
+ type CustomIdConstructOptions = {
64
+ compType: ComponentType;
65
+ data: string;
66
+ tags?: ComponentCustomIdTag[];
67
+ };
68
+
8
69
  /**
9
70
  * Base command interface.
10
71
  *
@@ -198,32 +259,6 @@ declare class EventRegistry extends BaseRegistry<Event> {
198
259
  bind(client: TriviousClient): void;
199
260
  }
200
261
 
201
- /**
202
- * Base component interface.
203
- *
204
- * @export
205
- * @interface Component
206
- * @typedef {Component}
207
- */
208
- interface Component {
209
- component: ComponentType;
210
- permission: PermissionLevel;
211
- /**
212
- * The full constructed customId.
213
- *
214
- * @type {?string}
215
- */
216
- customId?: string;
217
- /**
218
- * The 'data' part of a constructed customId.
219
- *
220
- * @type {?string}
221
- */
222
- customIdData?: string;
223
- ephemeralReply?: boolean;
224
- execute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void> | void;
225
- }
226
-
227
262
  /**
228
263
  * Registry to load and get all components.
229
264
  *
@@ -238,7 +273,7 @@ declare class ComponentRegistry extends BaseRegistry<Component> {
238
273
  * Load all components.
239
274
  *
240
275
  * @async
241
- * @param {string} [directory=getCorePath({ coreDirectory: "events" })]
276
+ * @param {string} [directory=getCorePath({ coreDirectory: "components" })]
242
277
  * @returns {Promise<this>}
243
278
  */
244
279
  load(directory?: string): Promise<this>;
@@ -338,4 +373,4 @@ type StringSelectMenuInteraction = StringSelectMenuInteraction$1<CacheType>;
338
373
  type ModalSubmitInteraction = ModalSubmitInteraction$1<CacheType>;
339
374
  type ContextMenuCommandInteraction = ContextMenuCommandInteraction$1<CacheType>;
340
375
 
341
- export { type ButtonInteraction as B, type Command as C, EventRegistry as E, ModuleRegistry as M, type SlashCommand as S, TriviousClient as T, type ChatInputCommandInteraction as a, type ContextMenuCommandInteraction as b, CommandRegistry as c, ComponentRegistry as d, type SlashSubcommand as e, type ContextMenuCommand as f, type CommandInteraction as g, type CommandFlags as h, type CommandContext as i, type Event as j, type Module as k, type Component as l, type StringSelectMenuInteraction as m, type ModalSubmitInteraction as n };
376
+ export { type ButtonInteraction as B, type Command as C, EventRegistry as E, ModuleRegistry as M, type SlashCommand as S, TriviousClient as T, type ChatInputCommandInteraction as a, type ContextMenuCommandInteraction as b, CommandRegistry as c, ComponentRegistry as d, type CustomIdConstructOptions as e, type Component as f, type ComponentCustomIdTag as g, type ComponentInteraction as h, ComponentType as i, type SlashSubcommand as j, type ContextMenuCommand as k, type CommandInteraction as l, type CommandFlags as m, type CommandContext as n, type Event as o, type Module as p, type StringSelectMenuInteraction as q, type ModalSubmitInteraction as r };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
- export { B as ButtonInteraction, a as ChatInputCommandInteraction, C as Command, i as CommandContext, h as CommandFlags, g as CommandInteraction, c as CommandRegistry, d as ComponentRegistry, f as ContextMenuCommand, b as ContextMenuCommandInteraction, j as Event, n as ModalSubmitInteraction, k as Module, S as SlashCommand, e as SlashSubcommand, m as StringSelectMenuInteraction, T as TriviousClient } from './index-BqxT-x7T.js';
2
+ export { B as ButtonInteraction, a as ChatInputCommandInteraction, C as Command, n as CommandContext, m as CommandFlags, l as CommandInteraction, c as CommandRegistry, f as Component, g as ComponentCustomIdTag, h as ComponentInteraction, d as ComponentRegistry, i as ComponentType, k as ContextMenuCommand, b as ContextMenuCommandInteraction, e as CustomIdConstructOptions, o as Event, r as ModalSubmitInteraction, p as Module, S as SlashCommand, j as SlashSubcommand, q as StringSelectMenuInteraction, T as TriviousClient } from './index-C2iWCQmv.js';
3
3
  export { createActionRow, createEmbed } from './core/builders/util.builders.js';
4
4
  export { PermissionLevel } from './shared/typings/permissions.js';
5
5
  export { BaseRegistry } from './shared/typings/registry.js';
6
- export { ComponentCustomIdTag, ComponentInteraction, ComponentType, CustomIdConstructOptions } from './shared/typings/components.js';
7
6
  export { TriviousClientOptions } from './shared/typings/client.js';
@@ -1,7 +1,6 @@
1
1
  import './permissions.js';
2
2
  import 'discord.js';
3
- export { C as Command, i as CommandContext, h as CommandFlags, g as CommandInteraction, f as ContextMenuCommand, S as SlashCommand, e as SlashSubcommand } from '../../index-BqxT-x7T.js';
3
+ export { C as Command, n as CommandContext, m as CommandFlags, l as CommandInteraction, k as ContextMenuCommand, S as SlashCommand, j as SlashSubcommand } from '../../index-C2iWCQmv.js';
4
4
  import './registry.js';
5
- import './components.js';
6
5
  import './client.js';
7
6
  import '../../core/builders/util.builders.js';
@@ -1,40 +1,6 @@
1
- import { AnySelectMenuInteraction, CacheType, ButtonInteraction, ModalSubmitInteraction } from 'discord.js';
2
-
3
- /**
4
- * Tags for component customIds.
5
- *
6
- * @export
7
- * @typedef {ComponentCustomIdTag}
8
- */
9
- type ComponentCustomIdTag = "awaited";
10
- /**
11
- * Interaction types for components.
12
- *
13
- * @export
14
- * @typedef {ComponentInteraction}
15
- */
16
- type ComponentInteraction = AnySelectMenuInteraction<CacheType> | ButtonInteraction<CacheType> | ModalSubmitInteraction<CacheType>;
17
- /**
18
- * What type of component is the componenty.
19
- *
20
- * @export
21
- * @enum {number}
22
- */
23
- declare enum ComponentType {
24
- Button = "button",
25
- SelectMenu = "select",
26
- Modal = "modal"
27
- }
28
- /**
29
- * Component customId construct options.
30
- *
31
- * @export
32
- * @typedef {CustomIdConstructOptions}
33
- */
34
- type CustomIdConstructOptions = {
35
- compType: ComponentType;
36
- data: string;
37
- tags?: ComponentCustomIdTag[];
38
- };
39
-
40
- export { type ComponentCustomIdTag, type ComponentInteraction, ComponentType, type CustomIdConstructOptions };
1
+ import 'discord.js';
2
+ import './permissions.js';
3
+ export { f as Component, g as ComponentCustomIdTag, h as ComponentInteraction, i as ComponentType, e as CustomIdConstructOptions } from '../../index-C2iWCQmv.js';
4
+ import './registry.js';
5
+ import './client.js';
6
+ import '../../core/builders/util.builders.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/shared/typings/components.ts"],"names":["ComponentType"],"mappings":"AA8BO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACN,EAAAA,eAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,eAAA,YAAA,CAAA,GAAa,QAAA;AACb,EAAAA,eAAA,OAAA,CAAA,GAAQ,OAAA;AAHG,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA","file":"components.js","sourcesContent":["import {\n\tAnySelectMenuInteraction,\n\tButtonInteraction,\n\tCacheType,\n\tModalSubmitInteraction,\n} from \"discord.js\";\n\n/**\n * Tags for component customIds.\n *\n * @export\n * @typedef {ComponentCustomIdTag}\n */\nexport type ComponentCustomIdTag = \"awaited\";\n/**\n * Interaction types for components.\n *\n * @export\n * @typedef {ComponentInteraction}\n */\nexport type ComponentInteraction =\n\t| AnySelectMenuInteraction<CacheType>\n\t| ButtonInteraction<CacheType>\n\t| ModalSubmitInteraction<CacheType>;\n/**\n * What type of component is the componenty.\n *\n * @export\n * @enum {number}\n */\nexport enum ComponentType {\n\tButton = \"button\",\n\tSelectMenu = \"select\",\n\tModal = \"modal\",\n}\n\n/**\n * Component customId construct options.\n *\n * @export\n * @typedef {CustomIdConstructOptions}\n */\nexport type CustomIdConstructOptions = {\n\tcompType: ComponentType;\n\tdata: string;\n\ttags?: ComponentCustomIdTag[];\n};\n"]}
1
+ {"version":3,"sources":["../../../src/shared/typings/components.ts"],"names":["ComponentType"],"mappings":"AA0DO,IAAK,aAAA,qBAAAA,cAAAA,KAAL;AACN,EAAAA,eAAA,QAAA,CAAA,GAAS,QAAA;AACT,EAAAA,eAAA,YAAA,CAAA,GAAa,QAAA;AACb,EAAAA,eAAA,OAAA,CAAA,GAAQ,OAAA;AAHG,EAAA,OAAAA,cAAAA;AAAA,CAAA,EAAA,aAAA,IAAA,EAAA","file":"components.js","sourcesContent":["import {\n\tAnySelectMenuInteraction,\n\tButtonInteraction,\n\tCacheType,\n\tModalSubmitInteraction,\n} from \"discord.js\";\nimport { PermissionLevel } from \"./permissions.js\";\nimport TriviousClient from \"src/core/client/trivious.client.js\";\n\n/**\n * Base component interface.\n *\n * @export\n * @interface Component\n * @typedef {Component}\n */\nexport interface Component {\n\tcomponent: ComponentType;\n\tpermission: PermissionLevel;\n\t/**\n\t * The full constructed customId.\n\t *\n\t * @type {?string}\n\t */\n\tcustomId?: string;\n\t/**\n\t * The 'data' part of a constructed customId.\n\t *\n\t * @type {?string}\n\t */\n\tcustomIdData?: string;\n\tephemeralReply?: boolean;\n\texecute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void> | void;\n}\n\n/**\n * Tags for component customIds.\n *\n * @export\n * @typedef {ComponentCustomIdTag}\n */\nexport type ComponentCustomIdTag = \"awaited\";\n/**\n * Interaction types for components.\n *\n * @export\n * @typedef {ComponentInteraction}\n */\nexport type ComponentInteraction =\n\t| AnySelectMenuInteraction<CacheType>\n\t| ButtonInteraction<CacheType>\n\t| ModalSubmitInteraction<CacheType>;\n/**\n * What type of component is the componenty.\n *\n * @export\n * @enum {number}\n */\nexport enum ComponentType {\n\tButton = \"button\",\n\tSelectMenu = \"select\",\n\tModal = \"modal\",\n}\n\n/**\n * Component customId construct options.\n *\n * @export\n * @typedef {CustomIdConstructOptions}\n */\nexport type CustomIdConstructOptions = {\n\tcompType: ComponentType;\n\tdata: string;\n\ttags?: ComponentCustomIdTag[];\n};\n"]}
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
- export { j as Event } from '../../index-BqxT-x7T.js';
2
+ export { o as Event } from '../../index-C2iWCQmv.js';
3
3
  import './permissions.js';
4
4
  import './registry.js';
5
- import './components.js';
6
5
  import './client.js';
7
6
  import '../../core/builders/util.builders.js';
@@ -1,7 +1,6 @@
1
1
  export { PermissionLevel } from './permissions.js';
2
2
  export { BaseRegistry } from './registry.js';
3
- export { ComponentCustomIdTag, ComponentInteraction, ComponentType, CustomIdConstructOptions } from './components.js';
4
- export { C as Command, i as CommandContext, h as CommandFlags, g as CommandInteraction, f as ContextMenuCommand, j as Event, k as Module, S as SlashCommand, e as SlashSubcommand } from '../../index-BqxT-x7T.js';
3
+ export { C as Command, n as CommandContext, m as CommandFlags, l as CommandInteraction, f as Component, g as ComponentCustomIdTag, h as ComponentInteraction, i as ComponentType, k as ContextMenuCommand, e as CustomIdConstructOptions, o as Event, p as Module, S as SlashCommand, j as SlashSubcommand } from '../../index-C2iWCQmv.js';
5
4
  export { TriviousClientOptions } from './client.js';
6
5
  import 'discord.js';
7
6
  import '../../core/builders/util.builders.js';
@@ -1,7 +1,6 @@
1
1
  import 'discord.js';
2
- export { k as Module } from '../../index-BqxT-x7T.js';
2
+ export { p as Module } from '../../index-C2iWCQmv.js';
3
3
  import './permissions.js';
4
4
  import './registry.js';
5
- import './components.js';
6
5
  import './client.js';
7
6
  import '../../core/builders/util.builders.js';
@@ -1,5 +1,9 @@
1
- import { CustomIdConstructOptions } from '../typings/components.js';
1
+ import { e as CustomIdConstructOptions } from '../../index-C2iWCQmv.js';
2
+ import '../typings/permissions.js';
3
+ import '../typings/registry.js';
2
4
  import 'discord.js';
5
+ import '../typings/client.js';
6
+ import '../../core/builders/util.builders.js';
3
7
 
4
8
  /**
5
9
  * Deconstruct a component customId into its parts.
@@ -1,8 +1,7 @@
1
- import { T as TriviousClient } from '../../index-BqxT-x7T.js';
1
+ import { T as TriviousClient } from '../../index-C2iWCQmv.js';
2
2
  import { PermissionLevel } from '../typings/permissions.js';
3
3
  import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
4
4
  import '../typings/registry.js';
5
- import '../typings/components.js';
6
5
  import '../typings/client.js';
7
6
  import '../../core/builders/util.builders.js';
8
7
 
@@ -1,8 +1,7 @@
1
1
  import { GuildMember } from 'discord.js';
2
2
  import { PermissionLevel } from '../typings/permissions.js';
3
- import { T as TriviousClient } from '../../index-BqxT-x7T.js';
3
+ import { T as TriviousClient } from '../../index-C2iWCQmv.js';
4
4
  import '../typings/registry.js';
5
- import '../typings/components.js';
6
5
  import '../typings/client.js';
7
6
  import '../../core/builders/util.builders.js';
8
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trivious",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "discord-bot",
@@ -1,7 +0,0 @@
1
- import 'discord.js';
2
- import '../../shared/typings/permissions.js';
3
- import '../../shared/typings/components.js';
4
- export { l as Component } from '../../index-BqxT-x7T.js';
5
- import '../../shared/typings/registry.js';
6
- import '../../shared/typings/client.js';
7
- import '../builders/util.builders.js';
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=component.base.js.map
3
- //# sourceMappingURL=component.base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"component.base.js"}