pineafan | 3276721 | 2022-03-14 21:27:39 +0000 | [diff] [blame^] | 1 | const {addLog} = require('../scripts/addLogs'); |
| 2 | |
| 3 | module.exports = { |
| 4 | name:'messageCreate', |
| 5 | once:false, |
| 6 | async execute(message) { |
| 7 | |
| 8 | const guildConfig = require(`../data/guilds/${message.guild.id}/config.json`); |
| 9 | if(guildConfig.images.enabled) { |
| 10 | |
| 11 | } |
| 12 | if(guildConfig.wordFilter.enabled) { |
| 13 | for(word of guildConfig.wordFilter.words.strict) { |
| 14 | if(message.content.toLowerCase().includes(word)) { |
| 15 | message.delete(); |
| 16 | // message.channel.send(`${message.author} has been warned for using a banned word.`); |
| 17 | break; |
| 18 | } |
| 19 | } |
| 20 | for(word of message.content.split(' ')) { |
| 21 | if(guildConfig.wordFilter.words.soft.includes(word)) { |
| 22 | message.delete(); |
| 23 | // message.channel.send(`${message.author} has been warned for using a banned word.`); |
| 24 | break; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | } |
| 29 | |
| 30 | |
| 31 | } |
| 32 | } |