mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Remove now useless cleverbot user lock
This commit is contained in:
@@ -9,7 +9,6 @@ XIAO_WEBHOOK_TOKEN=
|
||||
POSTER_ID=
|
||||
POSTER_TOKEN=
|
||||
POSTER_TIME=
|
||||
CLEVERBOT_PATTERN_USERS=
|
||||
|
||||
# Emoji IDs
|
||||
GOLD_FISH_EMOJI_ID=
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user