aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/warn.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-25 18:27:29 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-25 18:27:29 -0400
commit2e539511a49ff993eded39751a2e768315ee4ff6 (patch)
tree32f0f1f512e87f2c0a9e4aa9db60fe2a349b1a71 /src/commands/moderation/warn.ts
parent1d9691083645fac0389ec98adfa66c99f75d58ad (diff)
downloadtanzanite-2e539511a49ff993eded39751a2e768315ee4ff6.tar.gz
tanzanite-2e539511a49ff993eded39751a2e768315ee4ff6.tar.bz2
tanzanite-2e539511a49ff993eded39751a2e768315ee4ff6.zip
some fixes
Diffstat (limited to 'src/commands/moderation/warn.ts')
-rw-r--r--src/commands/moderation/warn.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts
index 33ac2a3..a9469cf 100644
--- a/src/commands/moderation/warn.ts
+++ b/src/commands/moderation/warn.ts
@@ -61,7 +61,8 @@ export default class WarnCommand extends BushCommand {
): Promise<unknown> {
const member = message.guild!.members.cache.get(user.id) as BushGuildMember;
const useForce = force && message.author.isOwner();
- const canModerateResponse = util.moderationPermissionCheck(message.member!, member, 'warn', true, useForce);
+ if (!message.member) throw new Error(`message.member is null`);
+ const canModerateResponse = util.moderationPermissionCheck(message.member, member, 'warn', true, useForce);
const victimBoldTag = `**${member.user.tag}**`;
if (canModerateResponse !== true) {