Closed ErraticFox closed 8 years ago
The cleverbot code must be structured differently now (always wrapped in a prepare() statement). See the usage here: https://github.com/fojas/cleverbot-node
I just checked and that's actually how I have it, excluding the tweaks to post stuff in my chat.
var cleverbot = require('cleverbot-node'),
talkbot = new cleverbot
exports.talk = {
talk(bot, msg, suffix) {
cleverbot.prepare(function() {
var conv = suffix
talkbot.write(conv, function(response) {
bot.reply(msg, `${response.message}`)
console.log(response.message)
})
})
}
}
Which version are you using? The older versions do not work anymore because of changes to cleverbot. The last few updates have just been for keeping up with those changes, so everything before the latest release is effectively broken.
I have it on my bot in Discord but I haven't used it, let alone, touched the command for cleverbot. Now I just get as a output.