HidemichiShimura / slack-cocktail-bot

A useful slack bot which suggest a cocktail name for Today
0 stars 0 forks source link
cocktail-db expressjs javascript nodejs slack-api slackbot

Slack Cocktail Bot

Description

This Slack bot picks one cocktail from numerous kinds for you.\ It's time to use this bot when you don't know what you feel like drinking tonight!

Built with

Installation on a local environment

Install ngrok

  1. Install ngrok

Slack App setup

  1. Create an app on Slack API
  2. Set scopes
    • app_mentions:read
    • channels:read
    • chat:write
    • groups:read
    • im:read
    • mpim:read
  3. Subscribe events
    • app_mention
  4. Add the app to a workspace
  5. Add the bot to a channel

Subscribe to The Cocktail DB API

  1. Subscribe to The Cocktail DB API at Rapid API

Clone the repository

git clone https://github.com/HidemichiShimura/slack-cocktail-bot

Set environment variables

  1. Set environment variable for Slack App Token and The Cocktail API key
export AUTH=<Bot User OAuth Token>
export X_RAPIDAPI_KEY=<X-RapidAPI-Key>

Usage

  1. Activate ngrok with Port 5000
ngrok http 5000
  1. Set URL created by ngrok to Request URL on Slack API

  2. Start app

npm start
  1. Mention the bot

Documentation