Skip to content

hobo05/lunchclubbot

Repository files navigation

Lunchclubbot

Originally forked from https://github.com/howdyai/botkit

Used the botkit framework to create a Slack chat bot that can do what a Yelp chatbot like the Slack Lunchbot and also store your own ratings for a restaurant.

Commands

  • help
  • hello
  • (stars) for (place)
  • my (place) rating
  • lunch club (place) ratings
  • search (place) in (location)
  • search (place)
  • reviews for (place)
  • menu for (place)
  • set location (location)
  • where are we
  • call me (name)
  • my name is (name)
  • who am i
  • what is my name
  • who are you
  • do you like me
  • tell (person) (something)

Tech Stack

How to Run

Local Setup

  1. Sign up for http://www.slack.com and create a team if you don't have admin rights in your current one

Heroku Setup

Deploy

  1. After performing the local setup and seeing that everything works, sign up for Heroku on the free plan with the button above
  • Follow the tutorial for Getting Started on Heroku with Node.js if you don't know how Heroku works
  • Create a new Heroku app from your project root
  • Install https://github.com/xavdid/heroku-config and push your .env settings to heroku
  • Run heroku scale web=0 worker=1 to make sure the chatbot isn't required to bind to the provided Heroku port, otherwise Heroku will shut the app down thinking the app is not responsive since it didn't bind to the port.
  • Push your app to the Heroku repo and tail the logs
  • Chat with your cloud-enabled bot!

Sample .env file

SLACK_TOKEN=abctoken
MONGODB_URL=mongodb://testuser:password@test.com/testdb

TODO

  • Remove extra files cloned from https://github.com/howdyai/botkit
  • Refactor code to use Promises for everything async
  • Command for top 10 rated restaurants (by team average and by user)
  • Restaurant wishlist