diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-10-03 22:57:40 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-10-03 22:57:40 -0400 |
commit | 612ed820a0600ec11ed642005377cd7f5a8a8b77 (patch) | |
tree | 6bca4e7268fd0063ff53cf64fa44df62a23dba50 /src/context-menu-commands/user/modlog.ts | |
parent | ed98ff7e2679f362f2657e77a6cf8dd3ce9b3d43 (diff) | |
download | tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.tar.gz tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.tar.bz2 tanzanite-612ed820a0600ec11ed642005377cd7f5a8a8b77.zip |
wip
Diffstat (limited to 'src/context-menu-commands/user/modlog.ts')
-rw-r--r-- | src/context-menu-commands/user/modlog.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/context-menu-commands/user/modlog.ts b/src/context-menu-commands/user/modlog.ts index c78396e..b68a7e9 100644 --- a/src/context-menu-commands/user/modlog.ts +++ b/src/context-menu-commands/user/modlog.ts @@ -1,6 +1,6 @@ import { ModlogCommand } from '#commands'; import { emojis, SlashMessage } from '#lib'; -import { CommandUtil, ContextMenuCommand } from 'discord-akairo'; +import { CommandUtil, ContextMenuCommand } from '@notenoughupdates/discord-akairo'; import { ApplicationCommandType, type ContextMenuCommandInteraction } from 'discord.js'; export default class ModlogContextMenuCommand extends ContextMenuCommand { @@ -8,7 +8,8 @@ export default class ModlogContextMenuCommand extends ContextMenuCommand { super('modlog', { name: "Users's Modlogs", type: ApplicationCommandType.User, - category: 'user' + category: 'user', + dmPermission: false }); } @@ -28,6 +29,8 @@ export default class ModlogContextMenuCommand extends ContextMenuCommand { const pseudoMessage = new SlashMessage(this.client, interaction as any); pseudoMessage.util = new CommandUtil(this.client.commandHandler, pseudoMessage); - void new ModlogCommand().exec(pseudoMessage, { search: interaction.targetId, hidden: false }); + const command = this.client.commandHandler.modules.get('modlog') as ModlogCommand; + + void command.exec(pseudoMessage, { search: interaction.targetId, hidden: false }); } } |