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 Twitter = require('twitter-lite');
const rand = require('../../rand.js');
const Filter = require('bad-words');
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 reload = require('auto-reload');
@ -31,10 +31,12 @@ class tweetCommand extends Command {
}
async exec(message, args) {
/*
let censor = reload('../../json/censor.json');
let uncensor = reload('../../json/uncensor.json');
filter.addWords(...censor);
filter.removeWords(...uncensor);
*/
const blacklist = reload('../../json/twiBlacklist.json');
@ -47,8 +49,10 @@ class tweetCommand extends Command {
if (!text)
return;
/*
//Filter out swear word
text = filter.clean(text);
*/
text = rand.random(text, message);