diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-17 12:31:09 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-17 12:31:09 -0400 |
commit | d40527d0a2d9f209905750258f71bedff1cdf089 (patch) | |
tree | e017fd844c2135bfc85228d00ef2617d24ce0a3f /src/commands/moderation/warn.ts | |
parent | d431ad00754f3f250103deedea495b9bcee73fc0 (diff) | |
download | tanzanite-d40527d0a2d9f209905750258f71bedff1cdf089.tar.gz tanzanite-d40527d0a2d9f209905750258f71bedff1cdf089.tar.bz2 tanzanite-d40527d0a2d9f209905750258f71bedff1cdf089.zip |
turned on ts strict option
Diffstat (limited to 'src/commands/moderation/warn.ts')
-rw-r--r-- | src/commands/moderation/warn.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/commands/moderation/warn.ts b/src/commands/moderation/warn.ts index 1aa14c3..33ac2a3 100644 --- a/src/commands/moderation/warn.ts +++ b/src/commands/moderation/warn.ts @@ -59,9 +59,9 @@ export default class WarnCommand extends BushCommand { message: BushMessage | BushSlashMessage, { user, reason, force }: { user: BushUser; reason: string; force: boolean } ): Promise<unknown> { - const member = message.guild.members.cache.get(user.id) as BushGuildMember; + 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); + const canModerateResponse = util.moderationPermissionCheck(message.member!, member, 'warn', true, useForce); const victimBoldTag = `**${member.user.tag}**`; if (canModerateResponse !== true) { @@ -81,12 +81,12 @@ export default class WarnCommand extends BushCommand { case 'failed to dm': return message.util.reply( `${util.emojis.warn} **${member.user.tag}** has been warned for the ${util.ordinal( - caseNum + caseNum ?? 0 )} time, however I could not send them a dm.` ); case 'success': return message.util.reply( - `${util.emojis.success} Successfully warned **${member.user.tag}** for the ${util.ordinal(caseNum)} time.` + `${util.emojis.success} Successfully warned **${member.user.tag}** for the ${util.ordinal(caseNum ?? 0)} time.` ); } } |