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

Improve message filter, increase max listeners due to console warnings

This commit is contained in:
AnxietyisReal 2023-06-11 22:54:07 +10:00
parent 05fa8ada60
commit b650d5a60a
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ export default class TClient extends Client {
this.MPServerCache = {players: [], status: null, name: null} as MPServerCache;
this.suggestion = new suggestion(this);
this.repeatedMessages = {};
this.setMaxListeners(20);
this.setMaxListeners(45);
this.statsGraph = -60;
}
async init(){

View File

@ -3,7 +3,7 @@ import TClient from 'src/client';
export default {
async run(client:TClient, message:Discord.Message){
if (message.author.bot || message.channel.type === Discord.ChannelType.DM) return;
const msgarr = message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n]/g, ' ').split(' ');
const msgarr = message.content.toLowerCase().replaceAll(/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?\n?1234567890]/g, '').split(' ');
let automodded: boolean;
const Whitelist = [] // Array of channel ids for automod to be disabled in (Disables bannedWords and advertisement, mind you.)