botmaster
botmaster copied to clipboard
Add botmaster-rivescript package
https://www.rivescript.com/
I'm not sure we need a package - I got Rivescript running within Botmaster by simply adding the following to app.js - it's super-simple to get working!
const RiveScript = require('rivescript');
const myBot = new RiveScript();
myBot.loadFile("hello.rive", loading_done, loading_error);
function loading_done (batch_num) {
console.log("Batch #" + batch_num + " has finished loading!");
}
function loading_error (error) {
console.log("Error when loading files: " + error);
}
botmaster.on('update', (bot, update) => {
var reply = myBot.reply("local-user", update.message.text);
bot.reply(update, reply);
}