aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/unmute.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/moderation/unmute.ts')
-rw-r--r--src/commands/moderation/unmute.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands/moderation/unmute.ts b/src/commands/moderation/unmute.ts
index 7e93d31..acbda3e 100644
--- a/src/commands/moderation/unmute.ts
+++ b/src/commands/moderation/unmute.ts
@@ -57,7 +57,8 @@ export default class UnmuteCommand extends BushCommand {
): Promise<unknown> {
const error = util.emojis.error;
const member = message.guild!.members.cache.get(user.id) as BushGuildMember;
- const canModerateResponse = util.moderationPermissionCheck(message.member!, member, 'unmute');
+ if (!message.member) throw new Error(`message.member is null`);
+ const canModerateResponse = util.moderationPermissionCheck(message.member, member, 'unmute');
const victimBoldTag = `**${member.user.tag}**`;
if (canModerateResponse !== true) {