Allow/Disallow Cleverbot

This commit is contained in:
Dragon Fire
2021-05-18 16:37:16 -04:00
parent d7be838434
commit 08235698e3
10 changed files with 110 additions and 3 deletions
+3
View File
@@ -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);
+3
View File
@@ -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.');
}