1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 08:20:58 -05:00

Fix scanMsg not filtering the message properly.

This commit is contained in:
AnxietyisReal 2023-10-12 17:14:46 +11:00
parent 3c4bc8df33
commit 1c41672103

View File

@ -6,7 +6,7 @@ export default class Automoderator {
return arr.includes(message.channelId); return arr.includes(message.channelId);
} }
static scanMsg(message:Discord.Message){ static scanMsg(message:Discord.Message){
return message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?0-9]/g, '').split(' ') return message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?0-9]|ing\b/g, '').split(' ')
} }
static async repeatedMessages(client:TClient, message:Discord.Message, thresholdTime:number, thresholdAmount:number, type:string, muteTime:string, muteReason:string){ static async repeatedMessages(client:TClient, message:Discord.Message, thresholdTime:number, thresholdAmount:number, type:string, muteTime:string, muteReason:string){
if (client.repeatedMessages[message.author.id]){ if (client.repeatedMessages[message.author.id]){