Skip to content

DFieldFL/slack-beer-search-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Slack Brewry DB search

Installation/Setup

Server

This node application runs using node v0.12.7 or newer.

  1. Clone repo to your webserver
  2. Copy config.templ.js to config.js
  3. Set values in config.js
  4. Determine what API you want to use 1. api - Set to 'untappd' if using the Untappd API or 'breweryDb' if using Brewery DB API 2. Untappd
    1. untappd.clientId - Get from https://untappd.com/api/docs/v4
    2. untappd.clientSecret - Ditto 3. Brewery DB
    3. brewerydb.key - Get from http://brewerydb.com
  5. slackToken - Get from slack https://api.slack.com/web
  6. searchLimit - Change the max number of search results that should be returned
  7. urlPrefix - (Optional) If you want to run the service under a sub URL (ex. http://foo.com/bar) add the prefix to this config option (ex. '/bar' if using http://foo.com/bar)
  8. Run npm install
  9. Start sever node app

Slack Command

  1. Go to https://[company name].slack.com/services/new/slash-commands
  2. Setup command endpoint it to your webserver http://[domain name]:[port]/[urlPrefix]

Usage

Help

/beer help

example command: /beer help

example response:

Help:
/[command] search Yuengling
/[command] display 16649
/[command] search SweetWater 420
/[command] help

Search for beer

/beer search [name of beer]

example command: /beer search Yuengling

example response:

Yuengling Bock Beer id:3kZwor
Yuengling Premium Beer id:2DdatF
Yuengling Light Beer id:eXMP2g
Yuengling Black id:3iNytk
Yuengling Porter id:BGTAQw

Display a beer to the entire chatroom and is linked to the corresponding API

/beer display [beer id | beer name]

example command: /beer display 3kZwor or /beer display Yuengling Bock

example response: alt tag

Display beer of the week to the entire chatroom (does not work if using Untappd API)

/beer otw

example command: /beer otw

example response: alt tag

About

Slack commands for searching beers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published