/bender-slack-bot

Slack bot with various commands (most of them does third party requests to return the data)

Primary LanguageTypeScriptMIT LicenseMIT

Bender - The Slack Bot

Latest CI build status Greenkeeper Commitizen friendly MIT License

Table of content

About

bender-slack-bot Slack integration (based on outgoing web hooks) which enables certain cool commands for slack team members in enabled slack channels.

It also has some cron type functions such as checking and announcing about certain users birthdays, standup times and ect.

Installation

  • Clone the repository
  • npm install - to install all required packages
  • Update systen evnironmental variables:
    • BSB_OPEN_WEATHER_API_TOKEN - open weather api token for !weather <city> command to work
    • BSB_DB_NAME, BSB_DB_USERNAME, BSB_DB_USER_PASSWORDE, BSB_DB_URL_ADDRESS - width mongo db credentials for !joke command to work (p.s. you also need to import your jokes, see jokesdb.txt as sample)
  • npm run build - to compile the app
  • Optional but recommended step: deploying app to Heroku or similar service
  • npm start - to run the bot server
  • Configure slack
    • Add new Outgoing hook as a custom integration
    • Configure it to be enabled on channels where you want bot to be active
    • Set the trigger words to be: !tfl,!joke,!chucknorris,!date,!time,!weather,!commands,Bender,bender,!codereview
    • In URLs field add url to your compiled and deployed (or local) bender bot instance e.g. https://benderthebot.herokuapp.com/slackBotTrigger

Commands

  • !codereview <List of Names/optional>: randomly chooses a person for a code review.
  • !tfl : sows current situation of London Tube Lines.
  • !weather <city / optional> : shows weather information in specified city (London is default)
  • !joke : tells a joke
  • !churcknorris : tells a chuck norris joke

Other features

  • Announces stand up times
  • Congratulates users when on their birthday!

Tested/Deployed to: Heroku