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

Update scanMsg regex to include 'ed'.

This commit is contained in:
toast-ts 2024-02-23 07:37:39 +11:00
parent 2c6b561872
commit 4379ecef56

View File

@ -3,7 +3,7 @@ import TClient from '../client.js';
import Logger from '../helpers/Logger.js'; import Logger from '../helpers/Logger.js';
export default class Automoderator { export default class Automoderator {
private static lockQuery:Set<Discord.Snowflake> = new Set(); private static lockQuery:Set<Discord.Snowflake> = new Set();
static scanMsg =(message:Discord.Message)=>message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?0-9]|[]|ing\b/g, '').split(' ').join(''); static scanMsg =(message:Discord.Message)=>message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?0-9]|[]|ing\b|ed\b/g, '').split(' ').join('');
static async repeatedMessages(client:TClient, message:Discord.Message, action:'mute'|'ban'|'softban', thresholdTime:number, thresholdAmount:number, type:string, duration:string, reason:string) { static async repeatedMessages(client:TClient, message:Discord.Message, action:'mute'|'ban'|'softban', thresholdTime:number, thresholdAmount:number, type:string, duration:string, reason:string) {
const now = Date.now(); const now = Date.now();