trivious 1.6.10 → 1.6.12
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.ts +1 -1
- package/dist/core/commands/methods.command.d.ts +1 -1
- package/dist/core/commands/methods.command.js +39 -13
- package/dist/core/commands/methods.command.js.map +1 -1
- package/dist/core/events/clientReady.d.ts +1 -1
- package/dist/core/events/interactionCreate.d.ts +1 -1
- package/dist/core/events/interactionCreate.js +13 -7
- package/dist/core/events/interactionCreate.js.map +1 -1
- package/dist/core/registry/command.registry.d.ts +1 -1
- package/dist/core/registry/component.registry.d.ts +1 -1
- package/dist/core/registry/event.registry.d.ts +1 -1
- package/dist/core/registry/index.d.ts +1 -1
- package/dist/core/registry/module.registry.d.ts +1 -1
- package/dist/core/registry/module.registry.js +7 -6
- package/dist/core/registry/module.registry.js.map +1 -1
- package/dist/{index-Bp5wuqp-.d.ts → index-D1Oz0EU6.d.ts} +9 -5
- package/dist/index.d.ts +1 -1
- package/dist/shared/typings/commands.d.ts +1 -1
- package/dist/shared/typings/components.d.ts +1 -1
- package/dist/shared/typings/events.d.ts +1 -1
- package/dist/shared/typings/index.d.ts +1 -1
- package/dist/shared/typings/module.d.ts +1 -1
- package/dist/shared/utility/components.utility.d.ts +1 -1
- package/dist/shared/utility/functions.d.ts +1 -1
- package/dist/shared/utility/permissions.utility.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export {
|
|
2
|
+
export { p as handleSlashCommand, o as interactionReply, v as verifyGuildPermission } from '../../index-D1Oz0EU6.js';
|
|
3
3
|
import '../../shared/typings/permissions.js';
|
|
4
4
|
import '../../shared/typings/registry.js';
|
|
5
5
|
import '../../shared/typings/client.js';
|
|
@@ -1,22 +1,36 @@
|
|
|
1
1
|
import { PermissionLevel } from '../../index.js';
|
|
2
2
|
import { hasPermission } from '../../shared/utility/functions.js';
|
|
3
3
|
|
|
4
|
-
async function
|
|
4
|
+
async function interactionReply(data) {
|
|
5
|
+
const { interaction, flags, options } = data;
|
|
6
|
+
if (!("reply" in interaction)) {
|
|
7
|
+
throw new Error(`Cannot reply to interaction type ${typeof interaction}`);
|
|
8
|
+
}
|
|
9
|
+
const ephemeral = flags?.includes("EphemeralReply");
|
|
10
|
+
const followUp = flags?.includes("FollowUp");
|
|
11
|
+
const newOptions = options;
|
|
12
|
+
if (ephemeral) newOptions.flags = ["Ephemeral"];
|
|
5
13
|
if (interaction.replied || interaction.deferred) {
|
|
6
|
-
await interaction.
|
|
7
|
-
|
|
14
|
+
if (followUp) await interaction.followUp(newOptions);
|
|
15
|
+
else await interaction.editReply(options);
|
|
16
|
+
} else {
|
|
17
|
+
await interaction.reply(newOptions);
|
|
8
18
|
}
|
|
9
|
-
const newOptions = { ...options };
|
|
10
|
-
if (command.flags && command.flags.includes("EphemeralReply")) newOptions.flags = ["Ephemeral"];
|
|
11
|
-
await interaction.reply(newOptions);
|
|
12
19
|
}
|
|
13
20
|
async function verifyGuildPermission(client, interaction, command, requiredPermission, doReply = true) {
|
|
14
21
|
if (!interaction.inGuild()) return true;
|
|
22
|
+
if (command.flags && command.flags.includes("OwnerOnly")) {
|
|
23
|
+
requiredPermission = PermissionLevel.BOT_OWNER;
|
|
24
|
+
}
|
|
15
25
|
const member = interaction.member;
|
|
16
26
|
const memberHasPermission = hasPermission(client, { permission: requiredPermission, member });
|
|
17
27
|
if (!memberHasPermission && doReply) {
|
|
18
|
-
await
|
|
19
|
-
|
|
28
|
+
await interactionReply({
|
|
29
|
+
flags: command.flags,
|
|
30
|
+
interaction,
|
|
31
|
+
options: {
|
|
32
|
+
content: `You do not have permission to run this command, required permission: \`${PermissionLevel[requiredPermission]}\``
|
|
33
|
+
}
|
|
20
34
|
});
|
|
21
35
|
}
|
|
22
36
|
return memberHasPermission;
|
|
@@ -36,24 +50,36 @@ async function handleSlashCommand(client, command, interaction) {
|
|
|
36
50
|
if (!hasPerm) return;
|
|
37
51
|
if (!options.getSubcommand(false) || !("subcommands" in command)) {
|
|
38
52
|
if (command.flags?.includes("DeferReply")) {
|
|
39
|
-
await
|
|
53
|
+
await interactionReply({
|
|
54
|
+
flags: command.flags,
|
|
55
|
+
interaction,
|
|
56
|
+
options: { content: "Processing command..." }
|
|
57
|
+
});
|
|
40
58
|
}
|
|
41
59
|
return;
|
|
42
60
|
}
|
|
43
61
|
const subcommandName = options.getSubcommand();
|
|
44
62
|
const subcommand = command.subcommands.get(subcommandName);
|
|
45
63
|
if (!subcommand) {
|
|
46
|
-
await
|
|
47
|
-
|
|
64
|
+
await interactionReply({
|
|
65
|
+
flags: command.flags,
|
|
66
|
+
interaction,
|
|
67
|
+
options: {
|
|
68
|
+
content: "This subcommand no longer exists or is not registered."
|
|
69
|
+
}
|
|
48
70
|
});
|
|
49
71
|
return;
|
|
50
72
|
}
|
|
51
73
|
if (subcommand.flags?.includes("DeferReply") && !subcommand.flags.includes("ModalResponse")) {
|
|
52
|
-
await
|
|
74
|
+
await interactionReply({
|
|
75
|
+
flags: command.flags,
|
|
76
|
+
interaction,
|
|
77
|
+
options: { content: "Processing command..." }
|
|
78
|
+
});
|
|
53
79
|
}
|
|
54
80
|
await subcommand.execute(client, interaction);
|
|
55
81
|
}
|
|
56
82
|
|
|
57
|
-
export {
|
|
83
|
+
export { handleSlashCommand, interactionReply, verifyGuildPermission };
|
|
58
84
|
//# sourceMappingURL=methods.command.js.map
|
|
59
85
|
//# sourceMappingURL=methods.command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/commands/methods.command.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../../../src/core/commands/methods.command.ts"],"names":[],"mappings":";;;AA6BA,eAAsB,iBAAiB,IAAA,EAIpC;AACF,EAAA,MAAM,EAAE,WAAA,EAAa,KAAA,EAAO,OAAA,EAAQ,GAAI,IAAA;AACxC,EAAA,IAAI,EAAE,WAAW,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,WAAA;AAAA,MACA,OAAA,EAAS;AAAA,QACR,OAAA,EAAS;AAAA;AACV,KACA,CAAA;AACD,IAAA;AAAA,EACD;AAGA,EAAA,IAAI,UAAA,CAAW,KAAA,EAAO,QAAA,CAAS,YAAY,CAAA,IAAK,CAAC,UAAA,CAAW,KAAA,CAAM,QAAA,CAAS,eAAe,CAAA,EAAG;AAC5F,IAAA,MAAM,gBAAA,CAAiB;AAAA,MACtB,OAAO,OAAA,CAAQ,KAAA;AAAA,MACf,WAAA;AAAA,MACA,OAAA,EAAS,EAAE,OAAA,EAAS,uBAAA;AAAwB,KAC5C,CAAA;AAAA,EACF;AAEA,EAAA,MAAM,UAAA,CAAW,OAAA,CAAQ,MAAA,EAAQ,WAAW,CAAA;AAC7C","file":"methods.command.js","sourcesContent":["import {\n\tCacheType,\n\tChatInputCommandInteraction,\n\tGuildMember,\n\tInteraction,\n\tInteractionEditReplyOptions,\n\tInteractionReplyOptions,\n\tMessagePayload,\n} from \"discord.js\";\nimport {\n\tCommand,\n\tCommandFlags,\n\tPermissionLevel,\n\tSlashCommand,\n\tSlashSubcommand,\n\tTriviousClient,\n} from \"src/index.js\";\nimport { hasPermission } from \"src/shared/utility/functions.js\";\n\n/**\n * Reply to a command, respecting whether it has been deferred or already replied to.\n *\n * @export\n * @async\n * @param {Command} command\n * @param {ChatInputCommandInteraction | ContextMenuCommandInteraction} interaction\n * @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options\n * @returns {*}\n */\nexport async function interactionReply(data: {\n\tflags?: (\"FollowUp\" | CommandFlags)[];\n\tinteraction: Interaction<CacheType>;\n\toptions: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions;\n}) {\n\tconst { interaction, flags, options } = data;\n\tif (!(\"reply\" in interaction)) {\n\t\tthrow new Error(`Cannot reply to interaction type ${typeof interaction}`);\n\t}\n\n\tconst ephemeral = flags?.includes(\"EphemeralReply\");\n\tconst followUp = flags?.includes(\"FollowUp\");\n\n\tconst newOptions = options as InteractionReplyOptions;\n\tif (ephemeral) newOptions.flags = [\"Ephemeral\"];\n\n\tif (interaction.replied || interaction.deferred) {\n\t\tif (followUp) await interaction.followUp(newOptions);\n\t\telse await interaction.editReply(options as InteractionEditReplyOptions);\n\t} else {\n\t\tawait interaction.reply(newOptions);\n\t}\n}\n\n/**\n * Compare a permission level to the guild member's permission level.\n *\n * @export\n * @async\n * @param {TriviousClient} client\n * @param {ChatInputCommandInteraction | ContextMenuCommandInteraction} interaction\n * @param {Command} command\n * @param {PermissionLevel} requiredPermission\n * @param {boolean} [doReply=true]\n * @returns {unknown}\n */\nexport async function verifyGuildPermission(\n\tclient: TriviousClient,\n\tinteraction: Interaction<CacheType>,\n\tcommand: Command,\n\trequiredPermission: PermissionLevel,\n\tdoReply: boolean = true\n) {\n\tif (!interaction.inGuild()) return true;\n\n\tif (command.flags && command.flags.includes(\"OwnerOnly\")) {\n\t\trequiredPermission = PermissionLevel.BOT_OWNER;\n\t}\n\n\tconst member = interaction.member as GuildMember;\n\tconst memberHasPermission = hasPermission(client, { permission: requiredPermission, member });\n\n\tif (!memberHasPermission && doReply) {\n\t\tawait interactionReply({\n\t\t\tflags: command.flags,\n\t\t\tinteraction,\n\t\t\toptions: {\n\t\t\t\tcontent: `You do not have permission to run this command, required permission: \\`${PermissionLevel[requiredPermission]}\\``,\n\t\t\t},\n\t\t});\n\t}\n\n\treturn memberHasPermission;\n}\n\n/**\n * Handle execution of a slash command.\n *\n * @export\n * @async\n * @param {TriviousClient} client\n * @param {(SlashCommand | SlashSubcommand)} command\n * @param {ChatInputCommandInteraction} interaction\n * @returns {*}\n */\nexport async function handleSlashCommand(\n\tclient: TriviousClient,\n\tcommand: SlashCommand,\n\tinteraction: ChatInputCommandInteraction\n) {\n\tconst { options } = interaction;\n\n\tconst hasPerm = await verifyGuildPermission(\n\t\tclient,\n\t\tinteraction,\n\t\tcommand,\n\t\tcommand.permission || PermissionLevel.USER,\n\t\ttrue\n\t);\n\n\tif (\"run\" in command && command.run && hasPerm) {\n\t\tawait command.run(client, interaction);\n\t}\n\n\tif (!hasPerm) return;\n\n\t// skip subcommand processing and respect command flags\n\tif (!options.getSubcommand(false) || !(\"subcommands\" in command)) {\n\t\tif (command.flags?.includes(\"DeferReply\")) {\n\t\t\tawait interactionReply({\n\t\t\t\tflags: command.flags,\n\t\t\t\tinteraction,\n\t\t\t\toptions: { content: \"Processing command...\" },\n\t\t\t});\n\t\t}\n\n\t\treturn;\n\t}\n\n\tconst subcommandName = options.getSubcommand();\n\tconst subcommand = command.subcommands!.get(subcommandName) as SlashSubcommand | undefined;\n\n\tif (!subcommand) {\n\t\tawait interactionReply({\n\t\t\tflags: command.flags,\n\t\t\tinteraction,\n\t\t\toptions: {\n\t\t\t\tcontent: \"This subcommand no longer exists or is not registered.\",\n\t\t\t},\n\t\t});\n\t\treturn;\n\t}\n\n\t// respect subcommand flags over command flags\n\tif (subcommand.flags?.includes(\"DeferReply\") && !subcommand.flags.includes(\"ModalResponse\")) {\n\t\tawait interactionReply({\n\t\t\tflags: command.flags,\n\t\t\tinteraction,\n\t\t\toptions: { content: \"Processing command...\" },\n\t\t});\n\t}\n\n\tawait subcommand.execute(client, interaction);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
|
-
import { T as TriviousClient } from '../../index-
|
|
2
|
+
import { T as TriviousClient } from '../../index-D1Oz0EU6.js';
|
|
3
3
|
import '../../shared/typings/permissions.js';
|
|
4
4
|
import '../../shared/typings/registry.js';
|
|
5
5
|
import '../../shared/typings/client.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as discord_js from 'discord.js';
|
|
2
2
|
import { CacheType } from 'discord.js';
|
|
3
|
-
import { T as TriviousClient } from '../../index-
|
|
3
|
+
import { T as TriviousClient } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import '../../shared/typings/permissions.js';
|
|
5
5
|
import '../../shared/typings/registry.js';
|
|
6
6
|
import '../../shared/typings/client.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonInteraction, ModalSubmitInteraction } from 'discord.js';
|
|
2
2
|
import { PermissionLevel, ComponentType } from '../../shared/typings/index.js';
|
|
3
3
|
import { hasPermission } from '../../shared/utility/functions.js';
|
|
4
|
-
import { verifyGuildPermission, handleSlashCommand } from '../commands/methods.command.js';
|
|
4
|
+
import { interactionReply, verifyGuildPermission, handleSlashCommand } from '../commands/methods.command.js';
|
|
5
5
|
import { deconstructCustomId } from '../../shared/utility/components.utility.js';
|
|
6
6
|
|
|
7
7
|
async function validateComponentGuildPermission(client, interaction, permission) {
|
|
@@ -20,9 +20,12 @@ var interactionCreate_default = {
|
|
|
20
20
|
const registeredCommands = client.registries.commands.get();
|
|
21
21
|
const command = registeredCommands.get(commandName);
|
|
22
22
|
if (!command) {
|
|
23
|
-
await
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
await interactionReply({
|
|
24
|
+
flags: ["EphemeralReply"],
|
|
25
|
+
interaction,
|
|
26
|
+
options: {
|
|
27
|
+
content: `Command is outdated, inactive or does not have a handler!`
|
|
28
|
+
}
|
|
26
29
|
});
|
|
27
30
|
return;
|
|
28
31
|
}
|
|
@@ -55,9 +58,12 @@ var interactionCreate_default = {
|
|
|
55
58
|
const registeredComponents = client.registries.components.get();
|
|
56
59
|
const component = registeredComponents.get(data);
|
|
57
60
|
if (!component) {
|
|
58
|
-
await
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
await interactionReply({
|
|
62
|
+
flags: ["EphemeralReply"],
|
|
63
|
+
interaction,
|
|
64
|
+
options: {
|
|
65
|
+
content: `Command is outdated, inactive or does not have a handler!`
|
|
66
|
+
}
|
|
61
67
|
});
|
|
62
68
|
return;
|
|
63
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/events/interactionCreate.ts"],"names":["hasPermission"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"sources":["../../../src/core/events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AA,EAAe;AAEpB,MAAA,IAAI,CAAC,WAAA,CAAY,aAAA,EAAc,EAAG,MAAM,YAAY,WAAA,EAAY;AAChE,MAAA,MAAM,SAAA,CAAU,OAAA,CAAQ,MAAA,EAAQ,WAAW,CAAA;AAAA,IAC5C;AAAA,EACD;AACD","file":"interactionCreate.js","sourcesContent":["import {\n\tButtonInteraction,\n\tCacheType,\n\tGuildMember,\n\tMessageContextMenuCommandInteraction,\n\tModalSubmitInteraction,\n\tUserContextMenuCommandInteraction,\n} from \"discord.js\";\nimport {\n\tComponentInteraction,\n\tComponentType,\n\tContextMenuCommand,\n\tEvent,\n\tPermissionLevel,\n\tSlashCommand,\n} from \"src/shared/typings/index.js\";\nimport { hasPermission } from \"src/shared/utility/functions.js\";\nimport {\n\thandleSlashCommand,\n\tinteractionReply,\n\tverifyGuildPermission,\n} from \"../commands/methods.command.js\";\nimport { ChatInputCommandInteraction } from \"src/index.js\";\nimport { deconstructCustomId } from \"src/shared/utility/components.utility.js\";\nimport TriviousClient from \"../client/trivious.client.js\";\n\nasync function validateComponentGuildPermission(\n\tclient: TriviousClient,\n\tinteraction: ComponentInteraction,\n\tpermission: PermissionLevel\n) {\n\tif (interaction.guild) {\n\t\tconst member = interaction.member as GuildMember;\n\t\tconst memberHasPermission = hasPermission(client, { permission, member });\n\t\treturn memberHasPermission;\n\t}\n\n\treturn false;\n}\n\nexport default {\n\tname: \"interactionCreate\",\n\texecute: async (client, interaction) => {\n\t\tif (interaction.isChatInputCommand() || interaction.isContextMenuCommand()) {\n\t\t\tconst { commandName } = interaction;\n\n\t\t\tconst registeredCommands = client.registries.commands.get();\n\t\t\tconst command = registeredCommands.get(commandName);\n\t\t\tif (!command) {\n\t\t\t\tawait interactionReply({\n\t\t\t\t\tflags: [\"EphemeralReply\"],\n\t\t\t\t\tinteraction,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tcontent: `Command is outdated, inactive or does not have a handler!`,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst requiredPermission = command.permission;\n\t\t\tconst hasPermission = await verifyGuildPermission(\n\t\t\t\tclient,\n\t\t\t\tinteraction,\n\t\t\t\tcommand,\n\t\t\t\trequiredPermission || PermissionLevel.USER\n\t\t\t);\n\t\t\tif (!hasPermission) return;\n\n\t\t\tif (command.context === \"SlashCommand\" && \"data\" in command) {\n\t\t\t\tawait handleSlashCommand(\n\t\t\t\t\tclient,\n\t\t\t\t\tcommand as SlashCommand,\n\t\t\t\t\tinteraction as ChatInputCommandInteraction\n\t\t\t\t);\n\t\t\t} else if (command.context === \"ContextMenu\") {\n\t\t\t\tawait (command as ContextMenuCommand).execute(\n\t\t\t\t\tclient,\n\t\t\t\t\tinteraction as\n\t\t\t\t\t\t| UserContextMenuCommandInteraction<CacheType>\n\t\t\t\t\t\t| MessageContextMenuCommandInteraction<CacheType>\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (interaction.isMessageComponent() || interaction.isModalSubmit()) {\n\t\t\tconst { compType, tags, data } = deconstructCustomId(interaction.customId);\n\n\t\t\tif (compType === ComponentType.Button && !(interaction instanceof ButtonInteraction)) return;\n\t\t\tif (compType === ComponentType.Modal && !(interaction instanceof ModalSubmitInteraction))\n\t\t\t\treturn;\n\n\t\t\tif (tags && tags.includes(\"awaited\")) return;\n\n\t\t\tconst registeredComponents = client.registries.components.get();\n\t\t\tconst component = registeredComponents.get(data);\n\t\t\tif (!component) {\n\t\t\t\tawait interactionReply({\n\t\t\t\t\tflags: [\"EphemeralReply\"],\n\t\t\t\t\tinteraction,\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tcontent: `Command is outdated, inactive or does not have a handler!`,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst requiredPermission = component.permission;\n\t\t\tconst hasPermission = await validateComponentGuildPermission(\n\t\t\t\tclient,\n\t\t\t\tinteraction,\n\t\t\t\trequiredPermission\n\t\t\t);\n\t\t\tif (!hasPermission) return;\n\n\t\t\tif (!interaction.isModalSubmit()) await interaction.deferUpdate();\n\t\t\tawait component.execute(client, interaction);\n\t\t}\n\t},\n} satisfies Event<\"interactionCreate\">;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
2
|
import '../../shared/typings/registry.js';
|
|
3
|
-
export { C as default } from '../../index-
|
|
3
|
+
export { C as default } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import '../../shared/typings/permissions.js';
|
|
5
5
|
import '../../shared/typings/client.js';
|
|
6
6
|
import '../builders/util.builders.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
2
|
import '../../shared/typings/registry.js';
|
|
3
|
-
export { a as default } from '../../index-
|
|
3
|
+
export { a as default } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import '../../shared/typings/permissions.js';
|
|
5
5
|
import '../../shared/typings/client.js';
|
|
6
6
|
import '../builders/util.builders.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
2
|
import '../../shared/typings/registry.js';
|
|
3
|
-
export { E as default } from '../../index-
|
|
3
|
+
export { E as default } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import '../../shared/typings/permissions.js';
|
|
5
5
|
import '../../shared/typings/client.js';
|
|
6
6
|
import '../builders/util.builders.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TriviousClientOptions } from '../../shared/typings/client.js';
|
|
2
|
-
import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, T as TriviousClient } from '../../index-
|
|
2
|
+
import { C as CommandRegistry, a as ComponentRegistry, E as EventRegistry, M as ModuleRegistry, T as TriviousClient } from '../../index-D1Oz0EU6.js';
|
|
3
3
|
import 'discord.js';
|
|
4
4
|
import '../../shared/typings/permissions.js';
|
|
5
5
|
import '../../shared/typings/registry.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
2
|
import '../../shared/typings/registry.js';
|
|
3
|
-
export { M as default } from '../../index-
|
|
3
|
+
export { M as default } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import '../../shared/typings/permissions.js';
|
|
5
5
|
import '../../shared/typings/client.js';
|
|
6
6
|
import '../builders/util.builders.js';
|
|
@@ -20,12 +20,13 @@ class ModuleRegistry extends BaseRegistry {
|
|
|
20
20
|
const entries = await promises.readdir(directory, { withFileTypes: true });
|
|
21
21
|
for (const entry of entries) {
|
|
22
22
|
const fullPath = join(directory, entry.name);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
const entryName = entry.name;
|
|
24
|
+
if (entry.isDirectory()) {
|
|
25
|
+
await this.load(fullPath);
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if ((entryName.endsWith(".ts") || entryName.endsWith(".js")) && !entryName.startsWith("index.") && !entryName.endsWith(".d.ts")) {
|
|
29
|
+
const moduleEvent = await this.importFile(fullPath);
|
|
29
30
|
if (!moduleEvent || !moduleEvent.events) continue;
|
|
30
31
|
this.items.set(moduleEvent.name, moduleEvent);
|
|
31
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/registry/module.registry.ts"],"names":["fs"],"mappings":";;;;;;AAeA,MAAO,uBAAqC,YAAA,CAAqB;AAAA,EACtD,KAAA,GAAQ,IAAI,UAAA,EAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASjD,MAAM,KAAK,SAAA,GAAoB,eAAA,CAAgB,KAAK,IAAA,CAAK,KAAA,EAAO,SAAS,CAAC,CAAA,EAAkB;AAC3F,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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AAI,CAAC,WAAA,IAAe,CAAC,WAAA,CAAY,MAAA,EAAQ;AAEzC,QAAA,IAAA,CAAK,KAAA,CAAM,GAAA,CAAI,WAAA,CAAY,IAAA,EAAM,WAAW,CAAA;AAAA,MAC7C;AAAA,IACD;AAEA,IAAA,OAAO,IAAA;AAAA,EACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,KAAK,MAAA,EAAwB;AAC5B,IAAA,KAAA,MAAW,GAAA,IAAO,IAAA,CAAK,KAAA,CAAM,MAAA,EAAO,EAAG;AACtC,MAAA,KAAA,MAAW,CAAC,WAAW,OAAO,CAAA,IAAK,OAAO,OAAA,CAAQ,GAAA,CAAI,MAAO,CAAA,EAAG;AAC/D,QAAA,IAAI,OAAO,YAAY,UAAA,EAAY;AAEnC,QAAA,MAAM,QAAA,GAAW,IAAI,IAAA,KAAoB;AACxC,UAAA,KAAM,OAAA,CAAgE,MAAA,EAAQ,GAAG,IAAI,CAAA;AAAA,QACtF,CAAA;AAEA,QAAC,MAAA,CAAO,EAAA,CAAW,SAAA,EAAW,QAAQ,CAAA;AAAA,MACvC;AAAA,IACD;AAAA,EACD;AACD","file":"module.registry.js","sourcesContent":["import { Collection } from \"discord.js\";\nimport { exists, resolveUserPath } from \"src/shared/utility/functions.js\";\nimport { BaseRegistry, Module } from \"src/shared/typings/index.js\";\nimport { promises as fs } from \"fs\";\nimport path, { join } from \"node:path\";\nimport TriviousClient from \"../client/trivious.client.js\";\n\n/**\n * Registry to load, get and bind modules.\n *\n * @export\n * @class ModuleRegistry\n * @typedef {ModuleRegistry}\n * @extends {BaseRegistry<Module>}\n */\nexport default class ModuleRegistry extends BaseRegistry<Module> {\n\tprotected items = new Collection<string, Module>();\n\n\t/**\n\t * Load all modules.\n\t *\n\t * @async\n\t * @param {string} [directory=getCorePath({ coreDirectory: \"module\" })]\n\t * @returns {Promise<this>}\n\t */\n\tasync load(directory: string = resolveUserPath(path.join(\"src\", \"modules\"))): Promise<this> {\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\tconst entryName = 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 (\n\t\t\t\t(entryName.endsWith(\".ts\") || entryName.endsWith(\".js\")) &&\n\t\t\t\t!entryName.startsWith(\"index.\") &&\n\t\t\t\t!entryName.endsWith(\".d.ts\")\n\t\t\t) {\n\t\t\t\tconst moduleEvent = await this.importFile<Module>(fullPath);\n\t\t\t\tif (!moduleEvent || !moduleEvent.events) continue;\n\n\t\t\t\tthis.items.set(moduleEvent.name, moduleEvent);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Bind all loaded modules to their client event respectively.\n\t *\n\t * @param {TriviousClient} client\n\t */\n\tbind(client: TriviousClient) {\n\t\tfor (const mod of this.items.values()) {\n\t\t\tfor (const [eventName, handler] of Object.entries(mod.events!)) {\n\t\t\t\tif (typeof handler !== \"function\") continue;\n\n\t\t\t\tconst listener = (...args: unknown[]) => {\n\t\t\t\t\tvoid (handler as (client: TriviousClient, ...args: unknown[]) => any)(client, ...args);\n\t\t\t\t};\n\n\t\t\t\t(client.on as any)(eventName, listener);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PermissionLevel } from './shared/typings/permissions.js';
|
|
2
2
|
import { BaseRegistry } from './shared/typings/registry.js';
|
|
3
3
|
import { TriviousClientOptions } from './shared/typings/client.js';
|
|
4
|
-
import { AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, Collection, SlashCommandSubcommandBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, ClientEvents, Client, MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions,
|
|
4
|
+
import { AnySelectMenuInteraction, CacheType, ButtonInteraction as ButtonInteraction$1, ModalSubmitInteraction as ModalSubmitInteraction$1, SlashCommandBuilder, Collection, SlashCommandSubcommandBuilder, ContextMenuCommandBuilder, MessageContextMenuCommandInteraction, UserContextMenuCommandInteraction, ClientEvents, Client, Interaction, MessagePayload, InteractionEditReplyOptions, InteractionReplyOptions, ChatInputCommandInteraction as ChatInputCommandInteraction$1, GuildMember, StringSelectMenuInteraction as StringSelectMenuInteraction$1, ContextMenuCommandInteraction as ContextMenuCommandInteraction$1 } from 'discord.js';
|
|
5
5
|
import './core/builders/util.builders.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -377,7 +377,11 @@ declare class TriviousClient extends Client {
|
|
|
377
377
|
* @param {(MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions)} options
|
|
378
378
|
* @returns {*}
|
|
379
379
|
*/
|
|
380
|
-
declare function
|
|
380
|
+
declare function interactionReply(data: {
|
|
381
|
+
flags?: ("FollowUp" | CommandFlags)[];
|
|
382
|
+
interaction: Interaction<CacheType>;
|
|
383
|
+
options: MessagePayload | InteractionEditReplyOptions | InteractionReplyOptions;
|
|
384
|
+
}): Promise<void>;
|
|
381
385
|
/**
|
|
382
386
|
* Compare a permission level to the guild member's permission level.
|
|
383
387
|
*
|
|
@@ -390,7 +394,7 @@ declare function commandReply(command: Command, interaction: ChatInputCommandInt
|
|
|
390
394
|
* @param {boolean} [doReply=true]
|
|
391
395
|
* @returns {unknown}
|
|
392
396
|
*/
|
|
393
|
-
declare function verifyGuildPermission(client: TriviousClient, interaction:
|
|
397
|
+
declare function verifyGuildPermission(client: TriviousClient, interaction: Interaction<CacheType>, command: Command, requiredPermission: PermissionLevel, doReply?: boolean): Promise<boolean>;
|
|
394
398
|
/**
|
|
395
399
|
* Handle execution of a slash command.
|
|
396
400
|
*
|
|
@@ -401,7 +405,7 @@ declare function verifyGuildPermission(client: TriviousClient, interaction: Chat
|
|
|
401
405
|
* @param {ChatInputCommandInteraction} interaction
|
|
402
406
|
* @returns {*}
|
|
403
407
|
*/
|
|
404
|
-
declare function handleSlashCommand(client: TriviousClient, command: SlashCommand, interaction: ChatInputCommandInteraction): Promise<void>;
|
|
408
|
+
declare function handleSlashCommand(client: TriviousClient, command: SlashCommand, interaction: ChatInputCommandInteraction$1): Promise<void>;
|
|
405
409
|
|
|
406
410
|
/**
|
|
407
411
|
* Deconstruct a component customId into its parts.
|
|
@@ -432,4 +436,4 @@ type StringSelectMenuInteraction = StringSelectMenuInteraction$1<CacheType>;
|
|
|
432
436
|
type ModalSubmitInteraction = ModalSubmitInteraction$1<CacheType>;
|
|
433
437
|
type ContextMenuCommandInteraction = ContextMenuCommandInteraction$1<CacheType>;
|
|
434
438
|
|
|
435
|
-
export { type ButtonInteraction as B, CommandRegistry as C, EventRegistry as E, ModuleRegistry as M, type SlashCommand as S, TriviousClient as T, ComponentRegistry as a, type Component as b, type ComponentCustomIdTag as c, type ComponentInteraction as d, ComponentType as e, type CustomIdConstructOptions as f, type Command as g, type SlashSubcommand as h, type ContextMenuCommand as i, type CommandInteraction as j, type CommandFlags as k, type CommandContext as l, type Event as m, type Module as n,
|
|
439
|
+
export { type ButtonInteraction as B, CommandRegistry as C, EventRegistry as E, ModuleRegistry as M, type SlashCommand as S, TriviousClient as T, ComponentRegistry as a, type Component as b, type ComponentCustomIdTag as c, type ComponentInteraction as d, ComponentType as e, type CustomIdConstructOptions as f, type Command as g, type SlashSubcommand as h, type ContextMenuCommand as i, type CommandInteraction as j, type CommandFlags as k, type CommandContext as l, type Event as m, type Module as n, interactionReply as o, handleSlashCommand as p, deconstructCustomId as q, constructCustomId as r, getPermissionLevel as s, type ChatInputCommandInteraction as t, type StringSelectMenuInteraction as u, verifyGuildPermission as v, type ModalSubmitInteraction as w, type ContextMenuCommandInteraction as x };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
|
-
export { B as ButtonInteraction, t as ChatInputCommandInteraction, g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, C as CommandRegistry, b as Component, c as ComponentCustomIdTag, d as ComponentInteraction, a as ComponentRegistry, e as ComponentType, i as ContextMenuCommand, x as ContextMenuCommandInteraction, f as CustomIdConstructOptions, m as Event, w as ModalSubmitInteraction, n as Module, S as SlashCommand, h as SlashSubcommand, u as StringSelectMenuInteraction, T as TriviousClient,
|
|
2
|
+
export { B as ButtonInteraction, t as ChatInputCommandInteraction, g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, C as CommandRegistry, b as Component, c as ComponentCustomIdTag, d as ComponentInteraction, a as ComponentRegistry, e as ComponentType, i as ContextMenuCommand, x as ContextMenuCommandInteraction, f as CustomIdConstructOptions, m as Event, w as ModalSubmitInteraction, n as Module, S as SlashCommand, h as SlashSubcommand, u as StringSelectMenuInteraction, T as TriviousClient, r as constructCustomId, q as deconstructCustomId, s as getPermissionLevel, p as handleSlashCommand, o as interactionReply, v as verifyGuildPermission } from './index-D1Oz0EU6.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';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './permissions.js';
|
|
2
2
|
import 'discord.js';
|
|
3
|
-
export { g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, i as ContextMenuCommand, S as SlashCommand, h as SlashSubcommand } from '../../index-
|
|
3
|
+
export { g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, i as ContextMenuCommand, S as SlashCommand, h as SlashSubcommand } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import './registry.js';
|
|
5
5
|
import './client.js';
|
|
6
6
|
import '../../core/builders/util.builders.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
2
|
import './permissions.js';
|
|
3
|
-
export { b as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, f as CustomIdConstructOptions } from '../../index-
|
|
3
|
+
export { b as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, f as CustomIdConstructOptions } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import './registry.js';
|
|
5
5
|
import './client.js';
|
|
6
6
|
import '../../core/builders/util.builders.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { PermissionLevel } from './permissions.js';
|
|
2
2
|
export { BaseRegistry } from './registry.js';
|
|
3
|
-
export { g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, b as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, i as ContextMenuCommand, f as CustomIdConstructOptions, m as Event, n as Module, S as SlashCommand, h as SlashSubcommand } from '../../index-
|
|
3
|
+
export { g as Command, l as CommandContext, k as CommandFlags, j as CommandInteraction, b as Component, c as ComponentCustomIdTag, d as ComponentInteraction, e as ComponentType, i as ContextMenuCommand, f as CustomIdConstructOptions, m as Event, n as Module, S as SlashCommand, h as SlashSubcommand } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
export { TriviousClientOptions } from './client.js';
|
|
5
5
|
import 'discord.js';
|
|
6
6
|
import '../../core/builders/util.builders.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { r as constructCustomId, q as deconstructCustomId } from '../../index-
|
|
1
|
+
export { r as constructCustomId, q as deconstructCustomId } from '../../index-D1Oz0EU6.js';
|
|
2
2
|
import '../typings/permissions.js';
|
|
3
3
|
import '../typings/registry.js';
|
|
4
4
|
import 'discord.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TriviousClient } from '../../index-
|
|
1
|
+
import { T as TriviousClient } from '../../index-D1Oz0EU6.js';
|
|
2
2
|
import { PermissionLevel } from '../typings/permissions.js';
|
|
3
3
|
import { User, GuildMember, RESTPostAPIApplicationCommandsJSONBody } from 'discord.js';
|
|
4
4
|
import '../typings/registry.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'discord.js';
|
|
2
2
|
import '../typings/permissions.js';
|
|
3
|
-
export { s as getPermissionLevel } from '../../index-
|
|
3
|
+
export { s as getPermissionLevel } from '../../index-D1Oz0EU6.js';
|
|
4
4
|
import '../typings/registry.js';
|
|
5
5
|
import '../typings/client.js';
|
|
6
6
|
import '../../core/builders/util.builders.js';
|