mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-17 16:30:58 -05:00
Fix case evasion check for expired value
This commit is contained in:
parent
ccaa1579b9
commit
b047cc4ee0
@ -114,7 +114,7 @@ export class PunishmentsSvc {
|
|||||||
return Math.max(...result.map((x:Punishment)=>x.case_id), 0) + 1;
|
return Math.max(...result.map((x:Punishment)=>x.case_id), 0) + 1;
|
||||||
}
|
}
|
||||||
async caseEvasionCheck(member:Discord.GuildMember) {
|
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(
|
(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.`,
|
`**${member.user.username}** (\`${member.user.id}\`) has been detected for case evasion.`,
|
||||||
'Timeout has been automatically added. (25 days)'
|
'Timeout has been automatically added. (25 days)'
|
||||||
|
Loading…
Reference in New Issue
Block a user