A simple bot that sets up reminders for users and messages them back. It consists of three files:
index.js
- the chat bot serverdialog.js
- the interaction dialog for the botjobs.js
- the reminder job that the bot runs
The bot is dependent on a large number of yowl packages.
yowl
- the root yowl package for chatbotsyowl-platform-cli
- communicate with yowl via the command lineyowl-platform-facebook
- communicate with yowl via facebook messengeryowl-dialog-manager
- manage conversational flow of the botyowl-session-redis
- persist yowl sessions in redisyowl-jobs-kue
- schedule reminders to be run at some point in the futureyowl-parse-dates
- parse natural language dates in messages
The combined functionality of these packages allows us to implement a basic chatbot in a well structured project using relatively small number of lines of code.
Due to yowl-session-redis
and yowl-jobs-kue
, you will also need a local
redis-server
.
node index.js --local --session XXXX --auth
Replace XXXX
with a unique session id.
Follow the instructions in the yowl-platform-facebook readme to get setup with Facebook messenger.
Then, run with the following command:
node index.js