trivious 2.3.0 → 2.3.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.
- package/dist/features/client/client.types.d.ts +1 -0
- package/dist/features/client/deploy.client.d.ts +2 -1
- package/dist/features/client/logger.d.ts +11 -0
- package/dist/features/client/logger.js +24 -0
- package/dist/features/client/logger.js.map +1 -0
- package/dist/features/client/trivious.client.d.ts +2 -1
- package/dist/features/client/trivious.client.js +3 -0
- package/dist/features/client/trivious.client.js.map +1 -1
- package/dist/features/commands/builders.commands.d.ts +2 -1
- package/dist/features/commands/commands.types.d.ts +2 -1
- package/dist/features/commands/methods.commands.d.ts +2 -1
- package/dist/features/commands/registry.commands.d.ts +2 -1
- package/dist/features/commands/registry.commands.js +7 -8
- package/dist/features/commands/registry.commands.js.map +1 -1
- package/dist/features/components/builders.components.d.ts +2 -1
- package/dist/features/components/components.types.d.ts +2 -1
- package/dist/features/components/registry.components.d.ts +2 -1
- package/dist/features/customId/customid.types.d.ts +2 -1
- package/dist/features/customId/methods.customid.d.ts +2 -1
- package/dist/features/events/builders.events.d.ts +2 -1
- package/dist/features/events/events.types.d.ts +2 -1
- package/dist/features/events/presets/clientReady.d.ts +2 -1
- package/dist/features/events/presets/interactionCreate.d.ts +2 -1
- package/dist/features/events/registry.events.d.ts +2 -1
- package/dist/features/modules/builders.modules.d.ts +2 -1
- package/dist/features/modules/modules.types.d.ts +2 -1
- package/dist/features/modules/registry.modules.d.ts +2 -1
- package/dist/features/permissions/methods.permissions.d.ts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/{modules.types-STECtgbF.d.ts → modules.types-hjAYMYut.d.ts} +2 -0
- package/dist/shared/registries.d.ts +2 -1
- package/dist/shared/typings.d.ts +2 -1
- package/dist/utility/errors.d.ts +2 -1
- package/package.json +2 -1
|
@@ -80,6 +80,7 @@ interface TriviousClientOptions extends ClientOptions {
|
|
|
80
80
|
corePath: string;
|
|
81
81
|
ownerUserIds?: string[];
|
|
82
82
|
commandHashConfig?: CommandHashConfiguration;
|
|
83
|
+
debug?: boolean;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
export type { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../modules.types-
|
|
1
|
+
import { T as TriviousClient } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import './client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import './logger.js';
|
|
5
6
|
|
|
6
7
|
declare function commandDeploy(client: TriviousClient): Promise<void>;
|
|
7
8
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare class Logger {
|
|
2
|
+
private prefix;
|
|
3
|
+
private debugActive;
|
|
4
|
+
constructor(prefix?: string, debugActive?: boolean);
|
|
5
|
+
debug(...args: any[]): void;
|
|
6
|
+
info(...args: any[]): void;
|
|
7
|
+
warn(...args: any[]): void;
|
|
8
|
+
error(...args: any[]): void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { Logger };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
class Logger {
|
|
3
|
+
constructor(prefix = "Trivious", debugActive = false) {
|
|
4
|
+
this.prefix = prefix;
|
|
5
|
+
this.debugActive = debugActive;
|
|
6
|
+
}
|
|
7
|
+
debug(...args) {
|
|
8
|
+
if (!this.debugActive) return;
|
|
9
|
+
console.log(chalk.gray(`[${this.prefix}] [DEBUG]`), ...args);
|
|
10
|
+
}
|
|
11
|
+
info(...args) {
|
|
12
|
+
console.log(chalk.cyan([`${this.prefix}`]), ...args);
|
|
13
|
+
}
|
|
14
|
+
warn(...args) {
|
|
15
|
+
console.log(chalk.yellow([`${this.prefix} [WARN]`]), ...args);
|
|
16
|
+
}
|
|
17
|
+
error(...args) {
|
|
18
|
+
console.log(chalk.red([`${this.prefix} [ERROR]`]), ...args);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
Logger
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/features/client/logger.ts"],"sourcesContent":["import chalk from \"chalk\";\n\nexport class Logger {\n\tconstructor(\n\t\tprivate prefix = \"Trivious\",\n\t\tprivate debugActive = false\n\t) {}\n\n\tdebug(...args: any[]) {\n\t\tif (!this.debugActive) return;\n\t\tconsole.log(chalk.gray(`[${this.prefix}] [DEBUG]`), ...args);\n\t}\n\n\tinfo(...args: any[]) {\n\t\tconsole.log(chalk.cyan([`${this.prefix}`]), ...args);\n\t}\n\n\twarn(...args: any[]) {\n\t\tconsole.log(chalk.yellow([`${this.prefix} [WARN]`]), ...args);\n\t}\n\n\terror(...args: any[]) {\n\t\tconsole.log(chalk.red([`${this.prefix} [ERROR]`]), ...args);\n\t}\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAEX,MAAM,OAAO;AAAA,EACnB,YACS,SAAS,YACT,cAAc,OACrB;AAFO;AACA;AAAA,EACN;AAAA,EAEH,SAAS,MAAa;AACrB,QAAI,CAAC,KAAK,YAAa;AACvB,YAAQ,IAAI,MAAM,KAAK,IAAI,KAAK,MAAM,WAAW,GAAG,GAAG,IAAI;AAAA,EAC5D;AAAA,EAEA,QAAQ,MAAa;AACpB,YAAQ,IAAI,MAAM,KAAK,CAAC,GAAG,KAAK,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI;AAAA,EACpD;AAAA,EAEA,QAAQ,MAAa;AACpB,YAAQ,IAAI,MAAM,OAAO,CAAC,GAAG,KAAK,MAAM,SAAS,CAAC,GAAG,GAAG,IAAI;AAAA,EAC7D;AAAA,EAEA,SAAS,MAAa;AACrB,YAAQ,IAAI,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,UAAU,CAAC,GAAG,GAAG,IAAI;AAAA,EAC3D;AACD;","names":[]}
|
|
@@ -3,12 +3,15 @@ import { Client, Collection } from "discord.js";
|
|
|
3
3
|
import structure from "../structure/index.structure.js";
|
|
4
4
|
import { TriviousError } from "../../utility/errors.js";
|
|
5
5
|
import commandDeploy from "./deploy.client.js";
|
|
6
|
+
import { Logger } from "./logger.js";
|
|
6
7
|
class TriviousClient extends Client {
|
|
7
8
|
trivious;
|
|
8
9
|
stores;
|
|
10
|
+
logger;
|
|
9
11
|
constructor(options) {
|
|
10
12
|
super(options);
|
|
11
13
|
this.trivious = options;
|
|
14
|
+
this.logger = new Logger("Trivious", !!options.debug);
|
|
12
15
|
this.stores = {
|
|
13
16
|
commands: {
|
|
14
17
|
chatInput: new Collection(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/client/trivious.client.ts"],"sourcesContent":["import registries from \"@shared/registries.js\";\nimport { Client, Collection } from \"discord.js\";\nimport structure from \"../structure/index.structure.js\";\n\nimport {\n\tComponent,\n\tContextCommandData,\n\tEvent,\n\tModule,\n\tSlashCommandData,\n\tTriviousClientOptions,\n} from \"@typings\";\nimport { TriviousError } from \"@utility/errors.js\";\nimport commandDeploy from \"./deploy.client.js\";\n\nexport default class TriviousClient extends Client {\n\ttrivious: TriviousClientOptions;\n\treadonly stores: {\n\t\tcommands: {\n\t\t\tchatInput: Collection<string, SlashCommandData>;\n\t\t\tcontext: Collection<string, ContextCommandData>;\n\t\t};\n\t\tcomponents: Collection<string, Component>;\n\t\tevents: Collection<string, Event>;\n\t\tmodules: Collection<string, Module>;\n\t};\n\n\tconstructor(options: TriviousClientOptions) {\n\t\tsuper(options);\n\t\tthis.trivious = options;\n\n\t\tthis.stores = {\n\t\t\tcommands: {\n\t\t\t\tchatInput: new Collection(),\n\t\t\t\tcontext: new Collection(),\n\t\t\t},\n\t\t\tcomponents: new Collection(),\n\t\t\tevents: new Collection(),\n\t\t\tmodules: new Collection(),\n\t\t};\n\t}\n\n\t/**\n\t * Register, deploy and log into the bot.\n\t *\n\t * @throws {TriviousError} If invalid bot token\n\t */\n\tasync start() {\n\t\tconst token = process.env[this.trivious.credentials.tokenReference];\n\t\tif (!token) {\n\t\t\tthrow new TriviousError(\n\t\t\t\t`Bot token environment variable '${this.trivious.credentials.tokenReference}' does not exist!`,\n\t\t\t\t\"Null environment variable\"\n\t\t\t);\n\t\t}\n\n\t\tawait this.register();\n\t\tawait this.deploy();\n\n\t\ttry {\n\t\t\tawait registries.events.bind(this);\n\t\t\tawait registries.modules.bind(this);\n\t\t} catch (err: any) {\n\t\t\tconst error = new TriviousError(err.message, \"Error during events and modules binds\");\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\tawait this.login(token);\n\t}\n\n\tasync register() {\n\t\tconst dir = structure.resolveRelativePath(this.trivious.corePath);\n\n\t\tawait registries.events.register(this, dir);\n\t\tawait registries.modules.register(this, dir);\n\t\tawait registries.commands.register(this, dir);\n\t\tawait registries.components.register(this, dir);\n\t}\n\n\tasync deploy() {\n\t\tawait commandDeploy(this);\n\t}\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,SAAS,QAAQ,kBAAkB;AACnC,OAAO,eAAe;AAUtB,SAAS,qBAAqB;AAC9B,OAAO,mBAAmB;
|
|
1
|
+
{"version":3,"sources":["../../../src/features/client/trivious.client.ts"],"sourcesContent":["import registries from \"@shared/registries.js\";\nimport { Client, Collection } from \"discord.js\";\nimport structure from \"../structure/index.structure.js\";\n\nimport {\n\tComponent,\n\tContextCommandData,\n\tEvent,\n\tModule,\n\tSlashCommandData,\n\tTriviousClientOptions,\n} from \"@typings\";\nimport { TriviousError } from \"@utility/errors.js\";\nimport commandDeploy from \"./deploy.client.js\";\nimport { Logger } from \"./logger.js\";\n\nexport default class TriviousClient extends Client {\n\ttrivious: TriviousClientOptions;\n\treadonly stores: {\n\t\tcommands: {\n\t\t\tchatInput: Collection<string, SlashCommandData>;\n\t\t\tcontext: Collection<string, ContextCommandData>;\n\t\t};\n\t\tcomponents: Collection<string, Component>;\n\t\tevents: Collection<string, Event>;\n\t\tmodules: Collection<string, Module>;\n\t};\n\tlogger: Logger;\n\n\tconstructor(options: TriviousClientOptions) {\n\t\tsuper(options);\n\t\tthis.trivious = options;\n\t\tthis.logger = new Logger(\"Trivious\", !!options.debug);\n\n\t\tthis.stores = {\n\t\t\tcommands: {\n\t\t\t\tchatInput: new Collection(),\n\t\t\t\tcontext: new Collection(),\n\t\t\t},\n\t\t\tcomponents: new Collection(),\n\t\t\tevents: new Collection(),\n\t\t\tmodules: new Collection(),\n\t\t};\n\t}\n\n\t/**\n\t * Register, deploy and log into the bot.\n\t *\n\t * @throws {TriviousError} If invalid bot token\n\t */\n\tasync start() {\n\t\tconst token = process.env[this.trivious.credentials.tokenReference];\n\t\tif (!token) {\n\t\t\tthrow new TriviousError(\n\t\t\t\t`Bot token environment variable '${this.trivious.credentials.tokenReference}' does not exist!`,\n\t\t\t\t\"Null environment variable\"\n\t\t\t);\n\t\t}\n\n\t\tawait this.register();\n\t\tawait this.deploy();\n\n\t\ttry {\n\t\t\tawait registries.events.bind(this);\n\t\t\tawait registries.modules.bind(this);\n\t\t} catch (err: any) {\n\t\t\tconst error = new TriviousError(err.message, \"Error during events and modules binds\");\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\tawait this.login(token);\n\t}\n\n\tasync register() {\n\t\tconst dir = structure.resolveRelativePath(this.trivious.corePath);\n\n\t\tawait registries.events.register(this, dir);\n\t\tawait registries.modules.register(this, dir);\n\t\tawait registries.commands.register(this, dir);\n\t\tawait registries.components.register(this, dir);\n\t}\n\n\tasync deploy() {\n\t\tawait commandDeploy(this);\n\t}\n}\n"],"mappings":"AAAA,OAAO,gBAAgB;AACvB,SAAS,QAAQ,kBAAkB;AACnC,OAAO,eAAe;AAUtB,SAAS,qBAAqB;AAC9B,OAAO,mBAAmB;AAC1B,SAAS,cAAc;AAEvB,MAAO,uBAAqC,OAAO;AAAA,EAClD;AAAA,EACS;A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|
|
|
1
|
-
import { j as ContextCommandData, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData } from '../../modules.types-
|
|
1
|
+
import { j as ContextCommandData, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function createSlashCommand(data: Omit<SlashCommandData, "context" | "commandType" | "subcommands" | "subcommandGroups">): SlashCommandData;
|
|
7
8
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CollatedCommandData, c as CommandFlags, d as CommandFunction, e as CommandSetData, j as ContextCommandData, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData } from '../../modules.types-
|
|
2
|
+
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CollatedCommandData, c as CommandFlags, d as CommandFunction, e as CommandSetData, j as ContextCommandData, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData } from '../../modules.types-hjAYMYut.js';
|
|
3
3
|
import '../permissions/permissions.types.js';
|
|
4
4
|
import '../client/client.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ChatInputCommandInteraction, Interaction, CacheType, InteractionReplyOptions, InteractionResponse, InteractionEditReplyOptions, Message, MessagePayload } from 'discord.js';
|
|
2
|
-
import { T as TriviousClient, S as SlashCommandData, c as CommandFlags } from '../../modules.types-
|
|
2
|
+
import { T as TriviousClient, S as SlashCommandData, c as CommandFlags } from '../../modules.types-hjAYMYut.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function interactionReply(options: {
|
|
7
8
|
interaction: Interaction<CacheType>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../modules.types-
|
|
1
|
+
import { T as TriviousClient } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function registerCommands(client: TriviousClient, directory: string): Promise<void>;
|
|
7
8
|
|
|
@@ -4,12 +4,10 @@ import { Collection } from "discord.js";
|
|
|
4
4
|
import { existsSync, promises as fs } from "fs";
|
|
5
5
|
import path from "path";
|
|
6
6
|
async function parseBase(input, expects) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
if (!existsSync(input)) return null;
|
|
12
|
-
const base = await importFile(input);
|
|
7
|
+
let base = null;
|
|
8
|
+
if (typeof input === "string") {
|
|
9
|
+
base = await importFile(input);
|
|
10
|
+
} else base = input;
|
|
13
11
|
if (!base) return null;
|
|
14
12
|
if (expects && !expects(base)) return null;
|
|
15
13
|
return base;
|
|
@@ -97,6 +95,7 @@ async function registerCommands(client, directory) {
|
|
|
97
95
|
SlashSubcommand: /* @__PURE__ */ new Set(),
|
|
98
96
|
SlashSubcommandGroup: /* @__PURE__ */ new Set()
|
|
99
97
|
};
|
|
98
|
+
client.logger.debug("Starting command registration in:", directory);
|
|
100
99
|
for await (const file of files) {
|
|
101
100
|
const parentDir = path.dirname(file);
|
|
102
101
|
if (processedDirectories.has(parentDir)) continue;
|
|
@@ -106,8 +105,8 @@ async function registerCommands(client, directory) {
|
|
|
106
105
|
await setChildrenToParents(data);
|
|
107
106
|
for (const [slashCommand] of data.SlashCommand) {
|
|
108
107
|
if (client.stores.commands.chatInput.get(slashCommand.data.name))
|
|
109
|
-
|
|
110
|
-
`
|
|
108
|
+
client.logger.warn(
|
|
109
|
+
`Command '${slashCommand.data.name}' has been overridden by a command with the same name`
|
|
111
110
|
);
|
|
112
111
|
client.stores.commands.chatInput.set(slashCommand.data.name, slashCommand);
|
|
113
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/commands/registry.commands.ts"],"sourcesContent":["import {\n\tCollatedCommandData,\n\tCommandSetData,\n\tSlashCommandData,\n\tSlashSubcommandData,\n\tSlashSubcommandGroupData,\n\tTriviousClient,\n} from \"@typings\";\nimport { TriviousError } from \"@utility/errors.js\";\nimport { importFile } from \"@utility/functions.js\";\nimport { Collection } from \"discord.js\";\nimport { existsSync, promises as fs } from \"fs\";\nimport path from \"path\";\n\nasync function parseBase<T>(input: string | T, expects?: (base: Partial<T>) => boolean) {\n\tif (typeof input
|
|
1
|
+
{"version":3,"sources":["../../../src/features/commands/registry.commands.ts"],"sourcesContent":["import {\n\tCollatedCommandData,\n\tCommandSetData,\n\tSlashCommandData,\n\tSlashSubcommandData,\n\tSlashSubcommandGroupData,\n\tTriviousClient,\n} from \"@typings\";\nimport { TriviousError } from \"@utility/errors.js\";\nimport { importFile } from \"@utility/functions.js\";\nimport { Collection } from \"discord.js\";\nimport { existsSync, promises as fs } from \"fs\";\nimport path from \"path\";\n\nasync function parseBase<T>(input: string | T, expects?: (base: Partial<T>) => boolean) {\n\tlet base: T | null = null;\n\tif (typeof input === \"string\") {\n\t\tbase = await importFile<T>(input);\n\t} else base = input;\n\tif (!base) return null;\n\tif (expects && !expects(base)) return null;\n\treturn base;\n}\n\nasync function parseDirectory(data: CollatedCommandData, directory: string): Promise<void> {\n\tconst files = fs.glob(path.join(directory, \"*.{js,ts}\"));\n\tfor await (const file of files) {\n\t\tconst base = await parseBase<SlashCommandData | SlashSubcommandData | SlashSubcommandGroupData>(\n\t\t\tfile,\n\t\t\t(base) => \"context\" in base && !!base.context\n\t\t);\n\t\tif (!base) continue;\n\t\tconst targetSet = data[base.context];\n\t\tif (targetSet) (targetSet as Set<[typeof base, string]>).add([base, directory]);\n\t}\n}\n\nfunction isSubdirectoryOf(directory: string, subdirectory: string) {\n\tconst relative = path.relative(path.resolve(directory), path.resolve(subdirectory));\n\treturn !!relative && !relative.startsWith(\"..\") && !path.isAbsolute(relative);\n}\n\nfunction getDataFromCommandSet<Data>(\n\tset: Set<CommandSetData<Data>>,\n\toptions: { matchParentDirectory?: string; matchData?: Partial<Data> }\n) {\n\tconst { matchData, matchParentDirectory } = options;\n\tif (!matchData && !matchParentDirectory) return undefined;\n\tconst array = Array.from(set.entries());\n\tlet bestMatch: CommandSetData<Data> | undefined;\n\tlet bestDepth = -1;\n\n\tfor (const entry of array) {\n\t\tconst [key, [data, directory]] = entry;\n\t\tif (matchData && data === matchData) return key[0];\n\t\tif (!matchParentDirectory) continue;\n\t\tconst isExact = directory === matchParentDirectory;\n\t\tconst isParent = isSubdirectoryOf(directory, matchParentDirectory);\n\t\tif (isExact || isParent) {\n\t\t\tconst depth = directory.split(/\\\\|\\//).length;\n\t\t\tif (depth > bestDepth) {\n\t\t\t\tbestDepth = depth;\n\t\t\t\tbestMatch = entry[0];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn bestMatch?.[0];\n}\n\nasync function setChildrenToParents(data: CollatedCommandData) {\n\tfor (const [group, directory] of data.SlashSubcommandGroup) {\n\t\tconst slashCommand =\n\t\t\tgroup.parent || getDataFromCommandSet(data.SlashCommand, { matchParentDirectory: directory });\n\n\t\tif (!slashCommand || !(\"addSubcommandGroup\" in slashCommand.data)) {\n\t\t\tconsole.warn(\"[Trivious] Could not find parent for subcommand group\", group.data.name);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!slashCommand.subcommandGroups) slashCommand.subcommandGroups = new Collection();\n\t\tif (slashCommand.subcommandGroups.has(group.data.name))\n\t\t\tconsole.warn(\n\t\t\t\t`[Trivious] SubcommandGroup '${group.data.name}' under SlashCommand '${slashCommand.data.name}' has been overridden by a group with the same name`\n\t\t\t);\n\t\tgroup.parent = slashCommand;\n\t\tslashCommand.subcommandGroups.set(group.data.name, group);\n\t\tslashCommand.data.addSubcommandGroup(group.data);\n\t}\n\n\tfor (const [subcommand, directory] of data.SlashSubcommand) {\n\t\tconst parent =\n\t\t\tsubcommand.parent ||\n\t\t\tgetDataFromCommandSet(data.SlashSubcommandGroup, { matchParentDirectory: directory }) ||\n\t\t\tgetDataFromCommandSet(data.SlashCommand, { matchParentDirectory: directory });\n\n\t\tif (!parent || !(\"addSubcommand\" in parent.data)) {\n\t\t\tconsole.warn(\"[Trivious] Could not find parent for subcommand\", subcommand.data.name);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!parent.subcommands) parent.subcommands = new Collection();\n\t\tif (parent.subcommands.has(subcommand.data.name))\n\t\t\tconsole.warn(\n\t\t\t\t`[Trivious] Subcommand '${subcommand.data.name}' under SlashCommand/SubcommandGroup '${parent.data.name}' has been overridden by a subcommand with the same name`\n\t\t\t);\n\t\tsubcommand.parent = parent;\n\t\tparent.subcommands.set(subcommand.data.name, subcommand);\n\t\tparent.data.addSubcommand(subcommand.data);\n\t}\n}\n\nexport default async function registerCommands(client: TriviousClient, directory: string) {\n\tif (!existsSync(directory))\n\t\tthrow new TriviousError(\n\t\t\t`Could not regsiter commands; passed directory ${directory} does not exist`,\n\t\t\t\"Nonexistant directory passed\"\n\t\t);\n\tconst processedDirectories = new Set<string>();\n\tconst files = fs.glob(path.join(directory, \"**/*.{js,ts}\"));\n\tconst data: CollatedCommandData = {\n\t\tSlashCommand: new Set<CommandSetData<SlashCommandData>>(),\n\t\tSlashSubcommand: new Set<CommandSetData<SlashSubcommandData>>(),\n\t\tSlashSubcommandGroup: new Set<CommandSetData<SlashSubcommandGroupData>>(),\n\t};\n\tclient.logger.debug(\"Starting command registration in:\", directory);\n\tfor await (const file of files) {\n\t\tconst parentDir = path.dirname(file);\n\t\tif (processedDirectories.has(parentDir)) continue;\n\t\tprocessedDirectories.add(parentDir);\n\t\tawait parseDirectory(data, parentDir);\n\t}\n\tawait setChildrenToParents(data);\n\tfor (const [slashCommand] of data.SlashCommand) {\n\t\tif (client.stores.commands.chatInput.get(slashCommand.data.name))\n\t\t\tclient.logger.warn(\n\t\t\t\t`Command '${slashCommand.data.name}' has been overridden by a command with the same name`\n\t\t\t);\n\t\tclient.stores.commands.chatInput.set(slashCommand.data.name, slashCommand);\n\t}\n}\n"],"mappings":"AAQA,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,YAAY,YAAY,UAAU;AAC3C,OAAO,UAAU;AAEjB,eAAe,UAAa,OAAmB,SAAyC;AACvF,MAAI,OAAiB;AACrB,MAAI,OAAO,UAAU,UAAU;AAC9B,WAAO,MAAM,WAAc,KAAK;AAAA,EACjC,MAAO,QAAO;AACd,MAAI,CAAC,KAAM,QAAO;AAClB,MAAI,WAAW,CAAC,QAAQ,IAAI,EAAG,QAAO;AACtC,SAAO;AACR;AAEA,eAAe,eAAe,MAA2B,WAAkC;AAC1F,QAAM,QAAQ,GAAG,KAAK,KAAK,KAAK,WAAW,WAAW,CAAC;AACvD,mBAAiB,QAAQ,OAAO;AAC/B,UAAM,OAAO,MAAM;AAAA,MAClB;AAAA,MACA,CAACA,UAAS,aAAaA,SAAQ,CAAC,CAACA,MAAK;AAAA,IACvC;AACA,QAAI,CAAC,KAAM;AACX,UAAM,YAAY,KAAK,KAAK,OAAO;AACnC,QAAI,UAAW,CAAC,UAAyC,IAAI,CAAC,MAAM,SAAS,CAAC;AAAA,EAC/E;AACD;AAEA,SAAS,iBAAiB,WAAmB,cAAsB;AAClE,QAAM,WAAW,KAAK,SAAS,KAAK,QAAQ,SAAS,GAAG,KAAK,QAAQ,YAAY,CAAC;AAClF,SAAO,CAAC,CAAC,YAAY,CAAC,SAAS,WAAW,IAAI,KAAK,CAAC,KAAK,WAAW,QAAQ;AAC7E;AAEA,SAAS,sBACR,KACA,SACC;AACD,QAAM,EAAE,WAAW,qBAAqB,IAAI;AAC5C,M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ACb,YAAY,aAAa,KAAK,IAAI;AAAA,MACnC;AACD,WAAO,OAAO,SAAS,UAAU,IAAI,aAAa,KAAK,MAAM,YAAY;AAAA,EAC1E;AACD;","names":["base"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { f as Component, g as ComponentContext } from '../../modules.types-
|
|
1
|
+
import { f as Component, g as ComponentContext } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Create component handler
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { f as Component, g as ComponentContext, h as ComponentFlags, i as ComponentInteraction } from '../../modules.types-
|
|
2
|
+
export { f as Component, g as ComponentContext, h as ComponentFlags, i as ComponentInteraction } from '../../modules.types-hjAYMYut.js';
|
|
3
3
|
import '../permissions/permissions.types.js';
|
|
4
4
|
import '../client/client.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../modules.types-
|
|
1
|
+
import { T as TriviousClient } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function registerComponents(client: TriviousClient, directory: string): Promise<void>;
|
|
7
8
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import '../client/client.types.js';
|
|
2
|
-
import { g as ComponentContext } from '../../modules.types-
|
|
2
|
+
import { g as ComponentContext } from '../../modules.types-hjAYMYut.js';
|
|
3
3
|
import '../permissions/permissions.types.js';
|
|
4
4
|
import 'discord.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
type ComponentTag = "awaited";
|
|
7
8
|
interface ComponentCustomId {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentCustomId } from './customid.types.js';
|
|
2
2
|
import '../client/client.types.js';
|
|
3
3
|
import 'discord.js';
|
|
4
|
-
import '../../modules.types-
|
|
4
|
+
import '../../modules.types-hjAYMYut.js';
|
|
5
5
|
import '../permissions/permissions.types.js';
|
|
6
|
+
import '../client/logger.js';
|
|
6
7
|
|
|
7
8
|
declare const customId: {
|
|
8
9
|
/**
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { E as Event } from '../../modules.types-
|
|
1
|
+
import { E as Event } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Create an event handler
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../../modules.types-
|
|
1
|
+
import { T as TriviousClient } from '../../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../../client/client.types.js';
|
|
4
4
|
import '../../permissions/permissions.types.js';
|
|
5
|
+
import '../../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare const _default: {
|
|
7
8
|
name: "clientReady";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { T as TriviousClient } from '../../../modules.types-
|
|
2
|
+
import { T as TriviousClient } from '../../../modules.types-hjAYMYut.js';
|
|
3
3
|
import '../../client/client.types.js';
|
|
4
4
|
import '../../permissions/permissions.types.js';
|
|
5
|
+
import '../../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare const _default: {
|
|
7
8
|
name: "interactionCreate";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../modules.types-
|
|
1
|
+
import { T as TriviousClient } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function bindEvents(client: TriviousClient): Promise<void>;
|
|
7
8
|
declare function registerEvents(client: TriviousClient, directory: string): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { M as Module } from '../../modules.types-
|
|
1
|
+
import { M as Module } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Create a module
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../modules.types-
|
|
1
|
+
import { T as TriviousClient } from '../../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import '../permissions/permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function bindModules(client: TriviousClient): Promise<void>;
|
|
7
8
|
declare function registerModules(client: TriviousClient, directory: string): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GuildMember, User } from 'discord.js';
|
|
2
|
-
import { T as TriviousClient, a as BaseCommandData, f as Component } from '../../modules.types-
|
|
2
|
+
import { T as TriviousClient, a as BaseCommandData, f as Component } from '../../modules.types-hjAYMYut.js';
|
|
3
3
|
import '../client/client.types.js';
|
|
4
4
|
import './permissions.types.js';
|
|
5
|
+
import '../client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare function canMemberRunCommand(client: TriviousClient, command: BaseCommandData | Component, member: GuildMember): [boolean, string];
|
|
7
8
|
declare function canUserRunCommand(client: TriviousClient, command: BaseCommandData | Component, user: User): [boolean, string];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from './features/client/client.types.js';
|
|
2
|
-
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CollatedCommandData, c as CommandFlags, d as CommandFunction, e as CommandSetData, f as Component, g as ComponentContext, h as ComponentFlags, i as ComponentInteraction, j as ContextCommandData, E as Event, M as Module, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, T as TriviousClient } from './modules.types-
|
|
2
|
+
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CollatedCommandData, c as CommandFlags, d as CommandFunction, e as CommandSetData, f as Component, g as ComponentContext, h as ComponentFlags, i as ComponentInteraction, j as ContextCommandData, E as Event, M as Module, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, T as TriviousClient } from './modules.types-hjAYMYut.js';
|
|
3
3
|
export { ComponentCustomId, ComponentTag } from './features/customId/customid.types.js';
|
|
4
4
|
export { CommandPermissionValues } from './features/permissions/permissions.types.js';
|
|
5
5
|
export { createActionRow, createEmbed } from './features/builders/utility.builders.js';
|
|
@@ -10,3 +10,4 @@ export { createButtonComponent, createComponent, createModalComponent, createSel
|
|
|
10
10
|
export { createEvent, createOnceEvent } from './features/events/builders.events.js';
|
|
11
11
|
export { createModule } from './features/modules/builders.modules.js';
|
|
12
12
|
import 'discord.js';
|
|
13
|
+
import './features/client/logger.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Client, Collection, ApplicationCommandType, SlashCommandBuilder, SlashCommandOptionsOnlyBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandSubcommandBuilder, Interaction, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, ChatInputCommandInteraction, SlashCommandSubcommandGroupBuilder, ButtonInteraction, AnySelectMenuInteraction, ModalSubmitInteraction, ClientEvents } from 'discord.js';
|
|
2
2
|
import { TriviousClientOptions } from './features/client/client.types.js';
|
|
3
3
|
import { CommandPermissionValues } from './features/permissions/permissions.types.js';
|
|
4
|
+
import { Logger } from './features/client/logger.js';
|
|
4
5
|
|
|
5
6
|
declare class TriviousClient extends Client {
|
|
6
7
|
trivious: TriviousClientOptions;
|
|
@@ -13,6 +14,7 @@ declare class TriviousClient extends Client {
|
|
|
13
14
|
events: Collection<string, Event>;
|
|
14
15
|
modules: Collection<string, Module>;
|
|
15
16
|
};
|
|
17
|
+
logger: Logger;
|
|
16
18
|
constructor(options: TriviousClientOptions);
|
|
17
19
|
/**
|
|
18
20
|
* Register, deploy and log into the bot.
|
|
@@ -2,10 +2,11 @@ import registerCommands from '../features/commands/registry.commands.js';
|
|
|
2
2
|
import registerComponents from '../features/components/registry.components.js';
|
|
3
3
|
import registerEvents, { bindEvents } from '../features/events/registry.events.js';
|
|
4
4
|
import registerModules, { bindModules } from '../features/modules/registry.modules.js';
|
|
5
|
-
import '../modules.types-
|
|
5
|
+
import '../modules.types-hjAYMYut.js';
|
|
6
6
|
import 'discord.js';
|
|
7
7
|
import '../features/client/client.types.js';
|
|
8
8
|
import '../features/permissions/permissions.types.js';
|
|
9
|
+
import '../features/client/logger.js';
|
|
9
10
|
|
|
10
11
|
declare const _default: {
|
|
11
12
|
readonly commands: {
|
package/dist/shared/typings.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { CommandHashConfiguration, FeatureBasedStructure, TriviousClientCredentials, TriviousClientOptions, TriviousStructure, TypeBasedStructure } from '../features/client/client.types.js';
|
|
2
|
-
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CollatedCommandData, c as CommandFlags, d as CommandFunction, e as CommandSetData, f as Component, g as ComponentContext, h as ComponentFlags, i as ComponentInteraction, j as ContextCommandData, E as Event, M as Module, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, T as TriviousClient } from '../modules.types-
|
|
2
|
+
export { B as BaseChatInputCommandData, a as BaseCommandData, C as ChatInputCommandContext, b as CollatedCommandData, c as CommandFlags, d as CommandFunction, e as CommandSetData, f as Component, g as ComponentContext, h as ComponentFlags, i as ComponentInteraction, j as ContextCommandData, E as Event, M as Module, S as SlashCommandData, k as SlashSubcommandData, l as SlashSubcommandGroupData, T as TriviousClient } from '../modules.types-hjAYMYut.js';
|
|
3
3
|
export { ComponentCustomId, ComponentTag } from '../features/customId/customid.types.js';
|
|
4
4
|
export { CommandPermissionValues } from '../features/permissions/permissions.types.js';
|
|
5
5
|
import 'discord.js';
|
|
6
|
+
import '../features/client/logger.js';
|
package/dist/utility/errors.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as BaseCommandData, S as SlashCommandData } from '../modules.types-
|
|
1
|
+
import { a as BaseCommandData, S as SlashCommandData } from '../modules.types-hjAYMYut.js';
|
|
2
2
|
import 'discord.js';
|
|
3
3
|
import '../features/client/client.types.js';
|
|
4
4
|
import '../features/permissions/permissions.types.js';
|
|
5
|
+
import '../features/client/logger.js';
|
|
5
6
|
|
|
6
7
|
declare class TriviousError extends Error {
|
|
7
8
|
readonly field?: string;
|
package/package.json
CHANGED