Skip to content

team401/team-info-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

team-info-bot

The team-info bot is a hook.io Javascript microservice that scrapes data from The Blue Alliance and posts it into slack channels.

Here's an example of the data returned by the bot:

team-info BOT [3:49 PM]
@pchild, here's your info:
Team 401 - Copperhead Robotics
Overall, team 401 was 38-22-0 in 2016.
http://www.thebluealliance.com/team/401

All code for the bot is available in the team-info file, and the rest of this README will cover setting up the bot on your own slack team.

Initial hook.io Setup

  1. Go to hook.io
  2. Create an account
  3. Create a new hook
  4. From your hook main page, click 'Create Hook'
  5. Name your hook
  6. Make sure the selected language is set to JavaScript
  7. Paste in the text of the team-info, or use the provided Gist.
  8. Click 'Create new Hook'
  9. Scroll to the 'Service URL' section, and copy the 'Home' URL for use in slack

Slack Slash Command Setup

  1. Custom Integration Setup
  2. Go to https://slack.com/apps/build
  3. Click 'Make a Custom Integration'
  4. Click 'Slash Commands'
  5. Set your desired command (we use /team)
  6. Click 'Add Slash Command Integration'
  7. Slash Command Settings
  8. Set the URL for the slash command to the Home URL copied from hook.io
  9. Make sure the slash command Method is set to 'POST'
  10. Copy the Token for use in hook.io
  11. Customize the name, icon, help text, and label of the command.
  12. Click 'Save Integration'.

Slack WebHook Setup

  1. Custom Integration Setup
  2. Go to https://slack.com/apps/build
  3. Click 'Make a Custom Integration'
  4. Click 'Incoming WebHooks'
  5. Default Channel
  6. Select a default channel for the bot (overriden as needed)
  7. Click 'Add Incoming WebHooks integration'
  8. Setting up the bot
  9. Copy the WebHook URL for use in hook.io
  10. Set up the label, name, and icon for the bot
  11. Click 'Save Settings'.

Setting Up hook.io Envioronment Variables

  1. Go to https://hook.io/env to setup your environment variables.
  2. Click 'Add new Key'
  3. Name your new key 'team_url'
  4. Set the value as the WebHook incoming URL you copied from slack.
  5. Click 'Add new Key' again
  6. Name the second new key 'team_token'
  7. Set the value as the slash command token value you copied from slack.
  8. Click 'Save Hook Environment Variables'

Using your team-info bot

You should now be able to invoke the slash command /team #### in any message or channel on slack and have the bot report the team name, record, and a link to their page on TBA!

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published