Skip to content

A Simple Trivia chatbot tutorial built using MessengerX.io and Open Trivia Database API and hosted on Heroku.

License

Notifications You must be signed in to change notification settings

machaao/TriviaBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A trivia chatbot - Powered by Open Trivia Database

Open Source Love Pull Requests Welcome Gitter

This repository showcases how to create a simple Trivia Bot on MessengerX.io using Open Trivia Database API and host it on Heroku.

Visit https://blog.messengerx.io/tutorials/create-a-trivia-bot-with-node-js-and-heroku/ for more information.

Want to Contribute? Follow the easy steps:

  1. Fork this repo. - Click the fork symbol on rightmost top corner of your window.

  2. Clone the forked repo. - Click the green button saying "Code" with a download button.

  3. Visit https://github.com/machaao/TriviaBot/issues and comment your username. - Thereby I would be able to assign this issue to you for contribution.

  4. Solve and Test your application. - You can do this in your own system with preferred editos.

  5. Create a Pull Request. - After making changes, click on pull requests button that opens a window saying "Create a Pull Request". Here you complete the formalities and do it!

Installation

git clone https://github.com/machaao/TriviaBot.git

cd TriviaBot

Getting Started

  1. Get Bot Token from https://portal.messengerx.io
  2. Open index.js in an editor
  3. Place the bot token at line 4.
const lib = new MxSdk('<----Bot Token----->', 'prod', server);
  1. npm install
  2. Commit the repo.
git add .

git commit -m "added Bot token"

Deployment

Deploying it on heroku

# For Ubuntu
sudo snap install --classic heroku

# For MacOS
brew tap heroku/brew && brew install heroku

# For other OS
# Visit https://devcenter.heroku.com/articles/heroku-cli

# Log into your account
heroku login

# Create an app
heroku create

# Uploading the files
git push heroku master

If deployment went good, update the chatbot endpoint -> https://<heroku-app-name>.herokuapp.com/incoming on https://portal.messengerx.io.

Documentation for Deploying on

  1. AWS Elastic Beanstalk
  2. GCP App Engine

Tools Used

  1. MessengerX API
  2. Trivia Quiz API
  3. Heroku

About

A Simple Trivia chatbot tutorial built using MessengerX.io and Open Trivia Database API and hosted on Heroku.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published