mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 04:10:59 -05:00
Fix case evasion check for expired value
This commit is contained in:
parent
8d03360899
commit
2e664c0e6a
@ -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)'
|
||||
|
Loading…
Reference in New Issue
Block a user