trivious 1.5.6 → 1.5.8
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/core/client/trivious.client.d.cts +1 -1
- package/dist/core/client/trivious.client.d.ts +1 -1
- package/dist/core/commands/command.base.d.cts +1 -1
- package/dist/core/commands/command.base.d.ts +1 -1
- package/dist/core/commands/subcommand.base.d.cts +1 -1
- package/dist/core/commands/subcommand.base.d.ts +1 -1
- package/dist/core/events/clientReady.d.cts +1 -1
- package/dist/core/events/clientReady.d.ts +1 -1
- package/dist/core/events/interactionCreate.d.cts +1 -1
- package/dist/core/events/interactionCreate.d.ts +1 -1
- package/dist/core/registry/command.registry.d.cts +1 -1
- package/dist/core/registry/command.registry.d.ts +1 -1
- package/dist/core/registry/component.registry.cjs +1 -1
- package/dist/core/registry/component.registry.cjs.map +1 -1
- package/dist/core/registry/component.registry.d.cts +1 -1
- package/dist/core/registry/component.registry.d.ts +1 -1
- package/dist/core/registry/component.registry.js +1 -1
- package/dist/core/registry/component.registry.js.map +1 -1
- package/dist/core/registry/event.registry.d.cts +1 -1
- package/dist/core/registry/event.registry.d.ts +1 -1
- package/dist/core/registry/index.d.cts +1 -1
- package/dist/core/registry/index.d.ts +1 -1
- package/dist/core/registry/module.registry.d.cts +1 -1
- package/dist/core/registry/module.registry.d.ts +1 -1
- package/dist/{index-BLUmi3ui.d.ts → index-eLNUBSEj.d.ts} +17 -0
- package/dist/{index-BBuxUTy6.d.cts → index-mw6RgN_f.d.cts} +17 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/shared/typings/client.d.cts +1 -1
- package/dist/shared/typings/client.d.ts +1 -1
- package/dist/shared/typings/commands.d.cts +1 -1
- package/dist/shared/typings/commands.d.ts +1 -1
- package/dist/shared/typings/components.cjs.map +1 -1
- package/dist/shared/typings/components.d.cts +1 -1
- package/dist/shared/typings/components.d.ts +1 -1
- package/dist/shared/typings/components.js.map +1 -1
- package/dist/shared/typings/events.d.cts +1 -1
- package/dist/shared/typings/events.d.ts +1 -1
- package/dist/shared/typings/index.d.cts +1 -1
- package/dist/shared/typings/index.d.ts +1 -1
- package/dist/shared/typings/module.d.cts +1 -1
- package/dist/shared/typings/module.d.ts +1 -1
- package/dist/shared/typings/permissions.d.cts +1 -1
- package/dist/shared/typings/permissions.d.ts +1 -1
- package/dist/shared/utility/functions.d.cts +1 -1
- package/dist/shared/utility/functions.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { l as CommandBuilder, n as ContextMenuBuilder, m as ContextMenuCommand, S as SlashCommand, k as default } from '../../index-
|
|
2
|
+
export { l as CommandBuilder, n as ContextMenuBuilder, m as ContextMenuCommand, S as SlashCommand, k as default } from '../../index-mw6RgN_f.cjs';
|
|
3
3
|
import '../../shared/typings/registry.cjs';
|
|
4
4
|
import '../builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { l as CommandBuilder, n as ContextMenuBuilder, m as ContextMenuCommand, S as SlashCommand, k as default } from '../../index-
|
|
2
|
+
export { l as CommandBuilder, n as ContextMenuBuilder, m as ContextMenuCommand, S as SlashCommand, k as default } from '../../index-eLNUBSEj.js';
|
|
3
3
|
import '../../shared/typings/registry.js';
|
|
4
4
|
import '../builders/util.builders.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { p as SubcommandBuilder, o as default } from '../../index-
|
|
2
|
+
export { p as SubcommandBuilder, o as default } from '../../index-mw6RgN_f.cjs';
|
|
3
3
|
import '../../shared/typings/registry.cjs';
|
|
4
4
|
import '../builders/util.builders.cjs';
|
|
@@ -31,7 +31,7 @@ class ComponentRegistry extends index_js.BaseRegistry {
|
|
|
31
31
|
if (entry.isFile() && entry.name.endsWith(".js")) {
|
|
32
32
|
const event = await this.importFile(fullPath);
|
|
33
33
|
if (!event) continue;
|
|
34
|
-
if (!event.customId ||
|
|
34
|
+
if (!(event.customId || event.customIdData)) {
|
|
35
35
|
console.error(`Component from ${entry.name} does not return customId nor customIdData!`);
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/registry/component.registry.ts"],"names":["BaseRegistry","Collection","resolveUserPath","path","exists","fs","join"],"mappings":";;;;;;;;;;;;AAcA,MAAO,0BAAwCA,qBAAA,CAAwB;AAAA,EAC5D,KAAA,GAAQ,IAAIC,qBAAA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpD,MAAM,KAAK,SAAA,GAAoBC,4BAAA,CAAgBC,sBAAK,IAAA,CAAK,KAAA,EAAO,QAAQ,CAAC,CAAA,EAAkB;AAC1F,IAAA,IAAI,CAAE,MAAMC,mBAAA,CAAO,SAAS,GAAI,OAAO,IAAA;AAEvC,IAAA,MAAM,OAAA,GAAU,MAAMC,WAAA,CAAG,OAAA,CAAQ,WAAW,EAAE,aAAA,EAAe,MAAM,CAAA;AACnE,IAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC5B,MAAA,MAAM,QAAA,GAAWC,SAAA,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,
|
|
1
|
+
{"version":3,"sources":["../../../src/core/registry/component.registry.ts"],"names":["BaseRegistry","Collection","resolveUserPath","path","exists","fs","join"],"mappings":";;;;;;;;;;;;AAcA,MAAO,0BAAwCA,qBAAA,CAAwB;AAAA,EAC5D,KAAA,GAAQ,IAAIC,qBAAA,EAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASpD,MAAM,KAAK,SAAA,GAAoBC,4BAAA,CAAgBC,sBAAK,IAAA,CAAK,KAAA,EAAO,QAAQ,CAAC,CAAA,EAAkB;AAC1F,IAAA,IAAI,CAAE,MAAMC,mBAAA,CAAO,SAAS,GAAI,OAAO,IAAA;AAEvC,IAAA,MAAM,OAAA,GAAU,MAAMC,WAAA,CAAG,OAAA,CAAQ,WAAW,EAAE,aAAA,EAAe,MAAM,CAAA;AACnE,IAAA,KAAA,MAAW,SAAS,OAAA,EAAS;AAC5B,MAAA,MAAM,QAAA,GAAWC,SAAA,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.cjs","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: \"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"]}
|
|
@@ -25,7 +25,7 @@ class ComponentRegistry extends BaseRegistry {
|
|
|
25
25
|
if (entry.isFile() && entry.name.endsWith(".js")) {
|
|
26
26
|
const event = await this.importFile(fullPath);
|
|
27
27
|
if (!event) continue;
|
|
28
|
-
if (!event.customId ||
|
|
28
|
+
if (!(event.customId || event.customIdData)) {
|
|
29
29
|
console.error(`Component from ${entry.name} does not return customId nor customIdData!`);
|
|
30
30
|
continue;
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
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,QAAQ,CAAC,CAAA,EAAkB;AAC1F,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,
|
|
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,QAAQ,CAAC,CAAA,EAAkB;AAC1F,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: \"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,4 +1,4 @@
|
|
|
1
|
-
import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-
|
|
1
|
+
import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-mw6RgN_f.cjs';
|
|
2
2
|
import '../../shared/typings/registry.cjs';
|
|
3
3
|
import 'discord.js';
|
|
4
4
|
import '../builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-
|
|
1
|
+
import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, b as TriviousClientOptions, T as TriviousClient } from '../../index-eLNUBSEj.js';
|
|
2
2
|
import '../../shared/typings/registry.js';
|
|
3
3
|
import 'discord.js';
|
|
4
4
|
import '../builders/util.builders.js';
|
|
@@ -50,9 +50,26 @@ declare enum ComponentType {
|
|
|
50
50
|
SelectMenu = "select",
|
|
51
51
|
Modal = "modal"
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Base component interface.
|
|
55
|
+
*
|
|
56
|
+
* @export
|
|
57
|
+
* @interface Component
|
|
58
|
+
* @typedef {Component}
|
|
59
|
+
*/
|
|
53
60
|
interface Component {
|
|
54
61
|
component: ComponentType;
|
|
62
|
+
/**
|
|
63
|
+
* The full constructed customId.
|
|
64
|
+
*
|
|
65
|
+
* @type {?string}
|
|
66
|
+
*/
|
|
55
67
|
customId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The 'data' part of a constructed customId.
|
|
70
|
+
*
|
|
71
|
+
* @type {?string}
|
|
72
|
+
*/
|
|
56
73
|
customIdData?: string;
|
|
57
74
|
permission: PermissionLevel;
|
|
58
75
|
ephemeralReply?: boolean;
|
|
@@ -50,9 +50,26 @@ declare enum ComponentType {
|
|
|
50
50
|
SelectMenu = "select",
|
|
51
51
|
Modal = "modal"
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Base component interface.
|
|
55
|
+
*
|
|
56
|
+
* @export
|
|
57
|
+
* @interface Component
|
|
58
|
+
* @typedef {Component}
|
|
59
|
+
*/
|
|
53
60
|
interface Component {
|
|
54
61
|
component: ComponentType;
|
|
62
|
+
/**
|
|
63
|
+
* The full constructed customId.
|
|
64
|
+
*
|
|
65
|
+
* @type {?string}
|
|
66
|
+
*/
|
|
55
67
|
customId?: string;
|
|
68
|
+
/**
|
|
69
|
+
* The 'data' part of a constructed customId.
|
|
70
|
+
*
|
|
71
|
+
* @type {?string}
|
|
72
|
+
*/
|
|
56
73
|
customIdData?: string;
|
|
57
74
|
permission: PermissionLevel;
|
|
58
75
|
ephemeralReply?: boolean;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, k as Command, l as CommandBuilder, q as CommandInteraction, r as CommandMetadata, C as CommandRegistry, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, a as ComponentRegistry, e as ComponentType, n as ContextMenuBuilder, m as ContextMenuCommand, F as ContextMenuCommandInteraction, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, D as ModalSubmitInteraction, x as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, o as Subcommand, p as SubcommandBuilder, s as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from './index-
|
|
2
|
+
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, k as Command, l as CommandBuilder, q as CommandInteraction, r as CommandMetadata, C as CommandRegistry, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, a as ComponentRegistry, e as ComponentType, n as ContextMenuBuilder, m as ContextMenuCommand, F as ContextMenuCommandInteraction, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, D as ModalSubmitInteraction, x as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, o as Subcommand, p as SubcommandBuilder, s as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from './index-mw6RgN_f.cjs';
|
|
3
3
|
export { createActionRow, createEmbed } from './core/builders/util.builders.cjs';
|
|
4
4
|
export { BaseRegistry } from './shared/typings/registry.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, k as Command, l as CommandBuilder, q as CommandInteraction, r as CommandMetadata, C as CommandRegistry, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, a as ComponentRegistry, e as ComponentType, n as ContextMenuBuilder, m as ContextMenuCommand, F as ContextMenuCommandInteraction, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, D as ModalSubmitInteraction, x as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, o as Subcommand, p as SubcommandBuilder, s as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from './index-
|
|
2
|
+
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, B as ButtonInteraction, y as ChatInputCommandInteraction, k as Command, l as CommandBuilder, q as CommandInteraction, r as CommandMetadata, C as CommandRegistry, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, a as ComponentRegistry, e as ComponentType, n as ContextMenuBuilder, m as ContextMenuCommand, F as ContextMenuCommandInteraction, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, D as ModalSubmitInteraction, x as Module, P as PermissionLevel, S as SlashCommand, z as StringSelectMenuInteraction, o as Subcommand, p as SubcommandBuilder, s as SubcommandMetadata, T as TriviousClient, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from './index-eLNUBSEj.js';
|
|
3
3
|
export { createActionRow, createEmbed } from './core/builders/util.builders.js';
|
|
4
4
|
export { BaseRegistry } from './shared/typings/registry.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, t as ContextMenuMetadata, s as SubcommandMetadata } from '../../index-
|
|
1
|
+
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, t as ContextMenuMetadata, s as SubcommandMetadata } from '../../index-mw6RgN_f.cjs';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import './registry.cjs';
|
|
4
4
|
import '../../core/builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, t as ContextMenuMetadata, s as SubcommandMetadata } from '../../index-
|
|
1
|
+
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, t as ContextMenuMetadata, s as SubcommandMetadata } from '../../index-eLNUBSEj.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import './registry.js';
|
|
4
4
|
import '../../core/builders/util.builders.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/typings/components.ts"],"names":["ComponentType"],"mappings":";;AAgCO,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;
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/typings/components.ts"],"names":["ComponentType"],"mappings":";;AAgCO,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;AAsCL,MAAM,mBAAA,GAAsB,CAAC,QAAA,KAAqB;AACxD,EAAA,MAAM,CAAC,aAAA,EAAe,QAAQ,CAAA,GAAI,QAAA,CAAS,MAAM,GAAG,CAAA;AACpD,EAAA,MAAM,CAAC,IAAA,EAAM,GAAG,IAAI,CAAA,GAAI,QAAA,CAAS,MAAM,GAAG,CAAA;AAE1C,EAAA,OAAO;AAAA,IACN,QAAA,EAAU,aAAA;AAAA,IACV,IAAA;AAAA,IACA;AAAA,GACD;AACD;AAoBO,MAAM,iBAAA,GAAoB,CAAC,OAAA,KAAsC;AACvE,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAK,GAAI,OAAA;AACjC,EAAA,OAAO,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,IAAI,CAAA,EAAG,IAAA,GAAO,CAAA,CAAA,EAAI,IAAA,CAAK,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA;AAC9D","file":"components.cjs","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 * 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 * Base component interface.\n *\n * @export\n * @interface Component\n * @typedef {Component}\n */\nexport interface Component {\n\tcomponent: ComponentType;\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\tpermission: PermissionLevel;\n\tephemeralReply?: boolean;\n\texecute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void> | void;\n}\n\n/**\n * Deconstruct a component customId into its parts.\n *\n * @param {string} customId\n * @returns {CustomIdConstructOptions}\n */\nexport const deconstructCustomId = (customId: string) => {\n\tconst [componentType, dataTags] = customId.split(\":\") as [ComponentType, string];\n\tconst [data, ...tags] = dataTags.split(\".\") as [string, ...ComponentCustomIdTag[]];\n\n\treturn {\n\t\tcompType: componentType,\n\t\tdata,\n\t\ttags,\n\t} as CustomIdConstructOptions;\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\n/**\n * Construct a component customId.\n *\n * @param {CustomIdConstructOptions} options\n * @returns {string}\n */\nexport const constructCustomId = (options: CustomIdConstructOptions) => {\n\tconst { data, compType, tags } = options;\n\treturn `${compType}:${data}${tags ? `.${tags.join(\".\")}` : \"\"}`;\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, i as CustomIdConstructOptions, j as constructCustomId, h as deconstructCustomId } from '../../index-
|
|
2
|
+
export { f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, i as CustomIdConstructOptions, j as constructCustomId, h as deconstructCustomId } from '../../index-mw6RgN_f.cjs';
|
|
3
3
|
import './registry.cjs';
|
|
4
4
|
import '../../core/builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, i as CustomIdConstructOptions, j as constructCustomId, h as deconstructCustomId } from '../../index-
|
|
2
|
+
export { f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, i as CustomIdConstructOptions, j as constructCustomId, h as deconstructCustomId } from '../../index-eLNUBSEj.js';
|
|
3
3
|
import './registry.js';
|
|
4
4
|
import '../../core/builders/util.builders.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/shared/typings/components.ts"],"names":["ComponentType"],"mappings":"AAgCO,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;
|
|
1
|
+
{"version":3,"sources":["../../../src/shared/typings/components.ts"],"names":["ComponentType"],"mappings":"AAgCO,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;AAsCL,MAAM,mBAAA,GAAsB,CAAC,QAAA,KAAqB;AACxD,EAAA,MAAM,CAAC,aAAA,EAAe,QAAQ,CAAA,GAAI,QAAA,CAAS,MAAM,GAAG,CAAA;AACpD,EAAA,MAAM,CAAC,IAAA,EAAM,GAAG,IAAI,CAAA,GAAI,QAAA,CAAS,MAAM,GAAG,CAAA;AAE1C,EAAA,OAAO;AAAA,IACN,QAAA,EAAU,aAAA;AAAA,IACV,IAAA;AAAA,IACA;AAAA,GACD;AACD;AAoBO,MAAM,iBAAA,GAAoB,CAAC,OAAA,KAAsC;AACvE,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAU,IAAA,EAAK,GAAI,OAAA;AACjC,EAAA,OAAO,CAAA,EAAG,QAAQ,CAAA,CAAA,EAAI,IAAI,CAAA,EAAG,IAAA,GAAO,CAAA,CAAA,EAAI,IAAA,CAAK,IAAA,CAAK,GAAG,CAAC,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA;AAC9D","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 * 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 * Base component interface.\n *\n * @export\n * @interface Component\n * @typedef {Component}\n */\nexport interface Component {\n\tcomponent: ComponentType;\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\tpermission: PermissionLevel;\n\tephemeralReply?: boolean;\n\texecute: (client: TriviousClient, interaction: ComponentInteraction) => Promise<void> | void;\n}\n\n/**\n * Deconstruct a component customId into its parts.\n *\n * @param {string} customId\n * @returns {CustomIdConstructOptions}\n */\nexport const deconstructCustomId = (customId: string) => {\n\tconst [componentType, dataTags] = customId.split(\":\") as [ComponentType, string];\n\tconst [data, ...tags] = dataTags.split(\".\") as [string, ...ComponentCustomIdTag[]];\n\n\treturn {\n\t\tcompType: componentType,\n\t\tdata,\n\t\ttags,\n\t} as CustomIdConstructOptions;\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\n/**\n * Construct a component customId.\n *\n * @param {CustomIdConstructOptions} options\n * @returns {string}\n */\nexport const constructCustomId = (options: CustomIdConstructOptions) => {\n\tconst { data, compType, tags } = options;\n\treturn `${compType}:${data}${tags ? `.${tags.join(\".\")}` : \"\"}`;\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, x as Module, P as PermissionLevel, s as SubcommandMetadata, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from '../../index-
|
|
1
|
+
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, x as Module, P as PermissionLevel, s as SubcommandMetadata, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from '../../index-mw6RgN_f.cjs';
|
|
2
2
|
export { BaseRegistry } from './registry.cjs';
|
|
3
3
|
import 'discord.js';
|
|
4
4
|
import '../../core/builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, x as Module, P as PermissionLevel, s as SubcommandMetadata, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from '../../index-
|
|
1
|
+
export { A as AnyCommand, u as AnyCommandBuilder, v as AnyCommandMetadata, q as CommandInteraction, r as CommandMetadata, f as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, t as ContextMenuMetadata, i as CustomIdConstructOptions, w as Event, x as Module, P as PermissionLevel, s as SubcommandMetadata, b as TriviousClientOptions, j as constructCustomId, h as deconstructCustomId, g as getPermissionLevel } from '../../index-eLNUBSEj.js';
|
|
2
2
|
export { BaseRegistry } from './registry.js';
|
|
3
3
|
import 'discord.js';
|
|
4
4
|
import '../../core/builders/util.builders.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { P as PermissionLevel, g as getPermissionLevel } from '../../index-
|
|
2
|
+
export { P as PermissionLevel, g as getPermissionLevel } from '../../index-mw6RgN_f.cjs';
|
|
3
3
|
import './registry.cjs';
|
|
4
4
|
import '../../core/builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { P as PermissionLevel, g as getPermissionLevel } from '../../index-
|
|
2
|
+
export { P as PermissionLevel, g as getPermissionLevel } from '../../index-eLNUBSEj.js';
|
|
3
3
|
import './registry.js';
|
|
4
4
|
import '../../core/builders/util.builders.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TriviousClient, P as PermissionLevel } from '../../index-
|
|
1
|
+
import { T as TriviousClient, P as PermissionLevel } from '../../index-mw6RgN_f.cjs';
|
|
2
2
|
import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
|
|
3
3
|
import '../typings/registry.cjs';
|
|
4
4
|
import '../../core/builders/util.builders.cjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TriviousClient, P as PermissionLevel } from '../../index-
|
|
1
|
+
import { T as TriviousClient, P as PermissionLevel } from '../../index-eLNUBSEj.js';
|
|
2
2
|
import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
|
|
3
3
|
import '../typings/registry.js';
|
|
4
4
|
import '../../core/builders/util.builders.js';
|