1
0
Fork 0

fix crash?

akairo
loicbersier 4 years ago
parent 6c0f5cd540
commit 7d934bb6f8

@ -35,6 +35,9 @@ class BannedWordsCommand extends Command {
}
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 = '';
args.word = args.word.replace(/[\u0250-\ue007]/g, '');
const bannedWords = await BannedWords.findOne({where: {word: args.word.toLowerCase(), serverID: message.guild.id}});

Loading…
Cancel
Save