mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 08:14:47 +02:00
Fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user