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:
parent
05fa8ada60
commit
b650d5a60a
@ -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(){
|
||||||
|
@ -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.)
|
||||||
|
Loading…
Reference in New Issue
Block a user