mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 15:56:52 +02:00
New nick env variable
This commit is contained in:
@@ -28,9 +28,12 @@ module.exports = class CleverbotCommand extends Command {
|
||||
try {
|
||||
const { body } = await request
|
||||
.post('https://cleverbot.io/1.0/ask')
|
||||
.send({ user: process.env.CLEVS_USER, key: process.env.CLEVS_KEY, text, nick: 'XiaoBot' });
|
||||
console.log(body.status, body.response, body);
|
||||
if(body.status !== 'success') throw new Error(body.status);
|
||||
.send({
|
||||
user: process.env.CLEVS_USER,
|
||||
key: process.env.CLEVS_KEY,
|
||||
nick: process.env.CLEVS_NICK,
|
||||
text
|
||||
});
|
||||
return msg.reply(body.response);
|
||||
} catch(err) {
|
||||
return msg.say(`An Error Occurred: ${err}`);
|
||||
|
||||
Reference in New Issue
Block a user