This commit is contained in:
Dragon Fire
2021-03-06 13:42:40 -05:00
parent 0cd2c8adb5
commit 3cbe54ee88
3 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -21,16 +21,18 @@ module.exports = class CleverbotCommand extends Command {
});
}
run(msg) {
async run(msg) {
if (this.client.cleverbots.has(msg.channel.id)) {
return msg.say('There is already a Cleverbot conversation in this channel.');
}
const cleverbot = new Cleverbot(this.client, msg.channel.id, msg.author.id);
this.client.cleverbots.set(msg.channel.id, cleverbot);
const usage = this.client.registry.commands.get('cleverbot-end').usage();
return msg.reply(stripIndents`
await msg.reply(stripIndents`
Cleverbot is now active in this channel, replying to ${msg.author}.
To end the conversation, use ${usage}.
`);
cleverbot.active = true;
return null;
}
};