From c6e0b564bf742ff772a24fd8c0c8d37acccce80e Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 19 Sep 2021 15:50:05 -0400 Subject: some minor fixes --- src/commands/moderation/modlog.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/commands/moderation') diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index c72ff39..0eb7392 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -27,7 +27,7 @@ export default class ModlogCommand extends BushCommand { default: false } ], - userPermissions: ['MANAGE_MESSAGES'], + userPermissions: [], slash: true, slashOptions: [ { @@ -62,6 +62,10 @@ export default class ModlogCommand extends BushCommand { message: BushMessage | BushSlashMessage, { search, hidden }: { search: BushUser | string; hidden: boolean } ): Promise { + if (!message.member?.permissions.has('MANAGE_MESSAGES')) + return await message.util.reply( + `${util.emojis.error} You must have the **Manage Message** permission to use this command.` + ); const foundUser = search instanceof User ? search : await util.resolveUserAsync(search); if (foundUser) { const logs = await ModLog.findAll({ -- cgit