Skip to content
A chatbot for rescuing you from uncomfortable silences.
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Duologue Bot

Getting Started


nvm install 7
nvm alias default 7
git clone
cd duologue-bot
npm i -g yarn nodemon now
yarn install

Running it locally

In tab 1:

cd duologue-bot
npm run dev

In tab 2:

cd duologue-bot
ngrok http --hostname --region eu 8572

Deploying Live

We deploy this to Zeit, you need to be part of the Duologue team to do this:

First up:

npm i -g now
now switch duologue

From within the project (once you confirm your changes all work locally):

now alias


In facebook

Go here:

Edit subscription. Paste in your ngrok url base.

Using the bot

To test, go here:

Talk to it :)

Live bot lives here:

Adjusting your state machine

state-definition is the events that point each state to each other. Each event needs an event, a from and a to. Your state-messages hold the definitions for each state.

So from a user's point of view interacting with the bot, typing, "Help, I don't understand what this is!" will cause the action help in state-definitions, leading to the state showHelp in state-messages.

There are two types of messages, quickReplies which have buttons that take a user to another state, and longer conversational text which users give free-text responses to. The bot 'listens' to the free-text responses for specific keywords, which send the user to the right state.

Caitlin Notes of useful stuff

Facebook Messenger tutorial stuff

Send stuff to the messenger api:

Conversation Interaction Design

Repairing broken conversations:

utf 8 emoji

Copy from this dictionary of awesomeness:

You can’t perform that action at this time.