blob: 46e879519f83eba1d1bcb41830c88cf1dc184b58 [file] [log] [blame]
const {addLog} = require('../scripts/addLogs');
module.exports = {
name:'messageCreate',
once:false,
async execute(message) {
const guildConfig = require(`../data/guilds/${message.guild.id}/config.json`);
if(guildConfig.images.enabled) {
}
if(guildConfig.wordFilter.enabled) {
for(word of guildConfig.wordFilter.words.strict) {
if(message.content.toLowerCase().includes(word)) {
message.delete();
// message.channel.send(`${message.author} has been warned for using a banned word.`);
break;
}
}
for(word of message.content.split(' ')) {
if(guildConfig.wordFilter.words.soft.includes(word)) {
message.delete();
// message.channel.send(`${message.author} has been warned for using a banned word.`);
break;
}
}
}
}
}