Remove now useless cleverbot user lock

This commit is contained in:
Dragon Fire
2019-12-10 17:39:22 -05:00
parent f1b82c7907
commit 60ca2756da
2 changed files with 2 additions and 7 deletions
-1
View File
@@ -9,7 +9,6 @@ XIAO_WEBHOOK_TOKEN=
POSTER_ID=
POSTER_TOKEN=
POSTER_TIME=
CLEVERBOT_PATTERN_USERS=
# Emoji IDs
GOLD_FISH_EMOJI_ID=
+2 -6
View File
@@ -1,7 +1,6 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
const { CLEVERBOT_KEY, CLEVERBOT_PATTERN_USERS } = process.env;
const allowedPatternUsers = CLEVERBOT_PATTERN_USERS ? CLEVERBOT_PATTERN_USERS.split(',') : [];
const { CLEVERBOT_KEY } = process.env;
const blankResponses = ['What?', 'Huh?', 'I don\'t understand.', 'Speak up, please.'];
module.exports = class CleverbotCommand extends Command {
@@ -32,10 +31,7 @@ module.exports = class CleverbotCommand extends Command {
}
async run(msg, { text }, fromPattern) {
if (fromPattern) {
if (!allowedPatternUsers.includes(msg.author.id)) return null;
text = msg.patternMatches[2];
}
if (fromPattern) text = msg.patternMatches[2];
try {
const convo = this.convos.get(msg.channel.id);
const { body } = await request