mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 23:05:04 +02:00
A
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
const Command = require('../../structures/Command');
|
||||
const Cleverbot = require('cleverio');
|
||||
const { CLEVS_KEY, CLEVS_USER, CLEVS_NICK } = process.env;
|
||||
|
||||
module.exports = class CleverbotCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'cleverbot',
|
||||
aliases: ['clevs', 'chat'],
|
||||
group: 'random',
|
||||
memberName: 'cleverbot',
|
||||
description: 'Talk to Cleverbot.',
|
||||
args: [
|
||||
{
|
||||
key: 'text',
|
||||
prompt: 'What do you want to say to Cleverbot?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
this.clevs = new Cleverbot({
|
||||
key: CLEVS_KEY,
|
||||
user: CLEVS_USER,
|
||||
nick: CLEVS_NICK
|
||||
});
|
||||
this.clevs.create();
|
||||
}
|
||||
|
||||
async run(msg, args) {
|
||||
const { text } = args;
|
||||
const { response } = await this.clevs.ask(text);
|
||||
return msg.reply(response);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user