1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-09-29 12:30:58 -04:00

Improve message filter, increase max listeners due to console warnings

This commit is contained in:
toast-ts 2023-06-11 22:54:07 +10:00
parent 6ce3f5a142
commit 57224b138c
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.MPServerCache = {players: [], status: null, name: null} as MPServerCache;
this.suggestion = new suggestion(this); this.suggestion = new suggestion(this);
this.repeatedMessages = {}; this.repeatedMessages = {};
this.setMaxListeners(20); this.setMaxListeners(45);
this.statsGraph = -60; this.statsGraph = -60;
} }
async init(){ async init(){

View File

@ -3,7 +3,7 @@ import TClient from 'src/client';
export default { export default {
async run(client:TClient, message:Discord.Message){ async run(client:TClient, message:Discord.Message){
if (message.author.bot || message.channel.type === Discord.ChannelType.DM) return; 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; let automodded: boolean;
const Whitelist = [] // Array of channel ids for automod to be disabled in (Disables bannedWords and advertisement, mind you.) const Whitelist = [] // Array of channel ids for automod to be disabled in (Disables bannedWords and advertisement, mind you.)