diff options
| author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-03 18:16:11 -0400 |
|---|---|---|
| committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-03 18:16:11 -0400 |
| commit | 3b1311951638bc54efbbb245632e2b3ab460f741 (patch) | |
| tree | 07fc42ba19a0ec4a2b3168faf96d284f726fb3da /src/commands/moderation | |
| parent | 4b4d05d9708bdaef2c93df1a83c4ce7ca4350f7a (diff) | |
| download | tanzanite-3b1311951638bc54efbbb245632e2b3ab460f741.tar.gz tanzanite-3b1311951638bc54efbbb245632e2b3ab460f741.tar.bz2 tanzanite-3b1311951638bc54efbbb245632e2b3ab460f741.zip | |
new links, bug fixes, excape rtl charecters in welcome messages
Diffstat (limited to 'src/commands/moderation')
| -rw-r--r-- | src/commands/moderation/warn.ts | 1 |
1 files changed, 1 insertions, 0 deletions
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<unknown> { 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); |
