mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 14:19:56 +02:00
Allow/Disallow Cleverbot
This commit is contained in:
@@ -12,6 +12,9 @@ module.exports = class CleverbotEndCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
if (!this.client.isOwner(msg.author) && !this.client.allowedUsers.includes(msg.author.id)) {
|
||||
return msg.say('You are not currently allowed to use Cleverbot.');
|
||||
}
|
||||
const cleverbot = this.client.cleverbots.get(msg.channel.id);
|
||||
if (!cleverbot) return msg.say('There is not a Cleverbot conversation in this channel.');
|
||||
clearTimeout(cleverbot.timeout);
|
||||
|
||||
@@ -22,6 +22,9 @@ module.exports = class CleverbotCommand extends Command {
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
if (!this.client.isOwner(msg.author) && !this.client.allowedUsers.includes(msg.author.id)) {
|
||||
return msg.say('You are not currently allowed to use Cleverbot.');
|
||||
}
|
||||
if (this.client.cleverbots.has(msg.channel.id)) {
|
||||
return msg.say('There is already a Cleverbot conversation in this channel.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user