Removing censor since it is bad

This commit is contained in:
loicbersier 2019-08-13 16:53:16 +02:00
parent 77f296998b
commit 17152adb2f

View file

@ -1,9 +1,9 @@
const { Command } = require('discord-akairo'); const { Command } = require('discord-akairo');
const Twitter = require('twitter-lite'); const Twitter = require('twitter-lite');
const rand = require('../../rand.js'); const rand = require('../../rand.js');
const Filter = require('bad-words');
const { MessageEmbed } = require('discord.js'); const { MessageEmbed } = require('discord.js');
let filter = new Filter(); //const Filter = require('bad-words');
//let filter = new Filter();
const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel } = require('../../config.json'); const { twiConsumer, twiConsumerSecret, twiToken, twiTokenSecret, twiChannel } = require('../../config.json');
const reload = require('auto-reload'); const reload = require('auto-reload');
@ -31,10 +31,12 @@ class tweetCommand extends Command {
} }
async exec(message, args) { async exec(message, args) {
/*
let censor = reload('../../json/censor.json'); let censor = reload('../../json/censor.json');
let uncensor = reload('../../json/uncensor.json'); let uncensor = reload('../../json/uncensor.json');
filter.addWords(...censor); filter.addWords(...censor);
filter.removeWords(...uncensor); filter.removeWords(...uncensor);
*/
const blacklist = reload('../../json/twiBlacklist.json'); const blacklist = reload('../../json/twiBlacklist.json');
@ -47,8 +49,10 @@ class tweetCommand extends Command {
if (!text) if (!text)
return; return;
/*
//Filter out swear word //Filter out swear word
text = filter.clean(text); text = filter.clean(text);
*/
text = rand.random(text, message); text = rand.random(text, message);