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

Fix scanMsg not filtering the message properly.

This commit is contained in:
toast-ts 2023-10-12 17:14:46 +11:00
parent f4fcd78774
commit 671d0c1b7a

View File

@ -6,7 +6,7 @@ export default class Automoderator {
return arr.includes(message.channelId);
}
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){
if (client.repeatedMessages[message.author.id]){