From d40527d0a2d9f209905750258f71bedff1cdf089 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Tue, 17 Aug 2021 12:31:09 -0400 Subject: turned on ts strict option --- src/commands/moderation/warn.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands/moderation/warn.ts') 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 { - 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.` ); } } -- cgit