From 3b1311951638bc54efbbb245632e2b3ab460f741 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 3 Oct 2021 18:16:11 -0400 Subject: new links, bug fixes, excape rtl charecters in welcome messages --- src/commands/moderation/warn.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'src/commands/moderation') diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index 44f4f5a..b4bf74d 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -60,6 +60,7 @@ export default class WarnCommand extends BushCommand { { user, reason, force }: { user: BushUser; reason: string; force: boolean } ): Promise { const member = message.guild!.members.cache.get(user.id) as BushGuildMember; + if (!member) return message.util.reply(`${util.emojis.error} I cannot warn users that are not in the server.`); const useForce = force && message.author.isOwner(); if (!message.member) throw new Error(`message.member is null`); const canModerateResponse = await util.moderationPermissionCheck(message.member, member, 'warn', true, useForce); -- cgit