aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-19 15:50:05 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-19 15:50:05 -0400
commitc6e0b564bf742ff772a24fd8c0c8d37acccce80e (patch)
treeab60f7ff22598ba70331a9686ec13b64a6abfaa0 /src/commands/moderation
parent98477a07a4a225e2a36cbe6c2c2cefd1d3c0a82e (diff)
downloadtanzanite-c6e0b564bf742ff772a24fd8c0c8d37acccce80e.tar.gz
tanzanite-c6e0b564bf742ff772a24fd8c0c8d37acccce80e.tar.bz2
tanzanite-c6e0b564bf742ff772a24fd8c0c8d37acccce80e.zip
some minor fixes
Diffstat (limited to 'src/commands/moderation')
-rw-r--r--src/commands/moderation/modlog.ts6
1 files changed, 5 insertions, 1 deletions
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<unknown> {
+ 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({