Better filter
This commit is contained in:
parent
8d5e3f7248
commit
4c9fc0f61e
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,8 @@
|
||||||
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('leo-profanity');
|
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');
|
||||||
|
|
||||||
|
@ -41,7 +42,6 @@ class tweetCommand extends Command {
|
||||||
|
|
||||||
//Filter out swear word
|
//Filter out swear word
|
||||||
text = filter.clean(text);
|
text = filter.clean(text);
|
||||||
console.log(text);
|
|
||||||
|
|
||||||
text = rand.random(text, message);
|
text = rand.random(text, message);
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google-cloud/text-to-speech": "^0.4.0",
|
"@google-cloud/text-to-speech": "^0.4.0",
|
||||||
"auto-reload": "^0.1.0",
|
"auto-reload": "^0.1.0",
|
||||||
|
"bad-words": "^3.0.1",
|
||||||
"canvas": "^2.3.0",
|
"canvas": "^2.3.0",
|
||||||
"discord-akairo": "github:1Computer1/discord-akairo#master",
|
"discord-akairo": "github:1Computer1/discord-akairo#master",
|
||||||
"discord.js": "github:discordjs/discord.js#master",
|
"discord.js": "github:discordjs/discord.js#master",
|
||||||
|
|
Loading…
Reference in a new issue