From 2e664c0e6a836d7ef5f8c18f08ff602701745a8d Mon Sep 17 00:00:00 2001 From: toast-ts <96593068+toast-ts@users.noreply.github.com> Date: Tue, 26 Dec 2023 22:41:39 +1100 Subject: [PATCH] Fix case evasion check for expired value --- src/models/punishments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/punishments.ts b/src/models/punishments.ts index e8b9307..6f639c3 100644 --- a/src/models/punishments.ts +++ b/src/models/punishments.ts @@ -114,7 +114,7 @@ export class PunishmentsSvc { return Math.max(...result.map((x:Punishment)=>x.case_id), 0) + 1; } async caseEvasionCheck(member:Discord.GuildMember) { - if (await this.model.findOne({where: {member: member.id, type: 'mute', expired: undefined}})) { + if (await this.model.findOne({where: {member: member.id, type: 'mute', expired: null}})) { (this.client.channels.cache.get(this.client.config.dcServer.channels.dcmod_chat) as Discord.TextChannel).send({embeds: [new this.client.embed().setColor(this.client.config.embedColorYellow).setTitle('Case evasion detected').setDescription(MessageTool.concatMessage( `**${member.user.username}** (\`${member.user.id}\`) has been detected for case evasion.`, 'Timeout has been automatically added. (25 days)'