fix crash?
This commit is contained in:
parent
6c0f5cd540
commit
7d934bb6f8
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,9 @@ class BannedWordsCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(message, args) {
|
async exec(message, args) {
|
||||||
|
// eslint-disable-next-line no-useless-escape
|
||||||
|
if (message.content.includes('(?:\s|/\*.*\*/|//.*|#.*)*\(.*\)')) return; // This make bot crash
|
||||||
|
|
||||||
if (!args.word) args.word = '';
|
if (!args.word) args.word = '';
|
||||||
args.word = args.word.replace(/[\u0250-\ue007]/g, '');
|
args.word = args.word.replace(/[\u0250-\ue007]/g, '');
|
||||||
const bannedWords = await BannedWords.findOne({where: {word: args.word.toLowerCase(), serverID: message.guild.id}});
|
const bannedWords = await BannedWords.findOne({where: {word: args.word.toLowerCase(), serverID: message.guild.id}});
|
||||||
|
|
Loading…
Reference in a new issue