Add patronOnly Option

This commit is contained in:
Dragon Fire
2021-05-18 20:14:25 -04:00
parent 0872c7e4aa
commit 45d38ff5b3
3 changed files with 15 additions and 14 deletions
+1 -6
View File
@@ -10,6 +10,7 @@ module.exports = class CleverbotCommand extends Command {
group: 'cleverbot',
memberName: 'cleverbot',
description: 'Starts a Cleverbot conversation.',
patronOnly: true,
credit: [
{
name: 'Cleverbot',
@@ -22,12 +23,6 @@ module.exports = class CleverbotCommand extends Command {
}
run(msg) {
if (!this.client.isOwner(msg.author) && !this.client.patreon.isPatron(msg.author.id)) {
return msg.say(stripIndents`
You are not currently allowed to use Cleverbot.
Please visit ${this.client.options.invite} for more information.
`);
}
if (this.client.cleverbots.has(msg.channel.id)) {
return msg.say('There is already a Cleverbot conversation in this channel.');
}