const commando = require('discord.js-commando');
var cleverbot = require("cleverbot.io"),
class TalkCommand extends commando.Command {
constructor(client) {
super(client, {
name: 'talk',
group: 'general',
memberName: 'talk',
description: "Shows information about Mitro",
aliases: ['t']
});
}
async run(message, args) {
cleverb = new cleverbot("private", "private");
cleverb.setNick("Nitro");
bot.create(function (err, session) {
bot.ask("Just a small town girl", function (err, response) {
console.log(response); // Will likely be: "Living in a lonely world"
});
});
}
}
module.exports = TalkCommand;
Error:
(node:5396) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'map' of null
(node:5396) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Code
Error:
Does anyone have any ideas?