1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 04:10:59 -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); 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]){