Closed mfornasa closed 9 years ago
The rivescript-js
module won't add code for a Slack adapter as it's outside of the scope; this project is purely for the chatbot logic component for letting people build their own bots.
However, I could add a minimalistic example to the eg/
directory that shows what's needed to interface with Slack. It wouldn't be a full production-ready bot, but would show the minimal code needed for it. I'll look into this when I get some time.
As for entry points: RiveScript should be easily pluggable into any system. So if you write code for the Slack API (i.e. with node-slack-client) and get to the point where you have a message from a user and want a bot's reply to it.... send that message into RiveScript with var reply = rs.reply(slackNick, slackMessage);
and post the response back to the Slack API.
I've added an example for connecting RiveScript to Slack: https://github.com/aichaos/rivescript-js/tree/master/eg/slack-bot
It seems to work very well, thanks!
Do you have any plan for a Slack adapter? Or: does the code provide entry points to write an adapter?