-
Notifications
You must be signed in to change notification settings - Fork 2
CoffeeTime dev setup
-
Create a new Slack workspace at https://slack.com/get-started. This is where you'll install your test CoffeeTime bot for development.
-
Remix CoffeeTime, then click "Show Live." The "live" website for the Slack bot is a step-by-step guide to installing your new test CoffeeTime on your test Slack.
-
Follow all the instructions for "Botkit Starter Kit" on the live website. NOTE: There are a few additional required steps that are not listed here, which are described below!
-
Under Event Subscriptions: Under Subscribe to Workspace Events, also include "app_uninstalled"
-
Under Slash Commands: Click "Create New Command", then add:
- Command: /coffeetime
- Request URL: YOUR_APP_NAME.glitch.me/slack/receive
- Short description: "Summons CoffeeTime"
- Usage hint: "subscribe, unsubscribe, help"
-
-
When you have filled out your .env file according to the instructions, the live page should change to say "I am a bot." Click the "Add to Slack" button.
-
One last weird thing: You need to now reinstall CoffeeTime again from https://api.slack.com/apps -_- It's dumb, the slash command /coffeetime will not work until you've done this:
- Go to https://api.slack.com/apps and click into your test bot
- You should see a bar at the top of the page telling you to "click here" to reinstall the app
- Follow the prompts!
That should do it! Try running /coffeetime
to see if it's working.
You can add test users to your Slack by inviting them using a plus alias for your Gmail address, like if your email is myemail@gmail.com, you can add myemail+test1@gmail.com, myemail+test2@gmail.com, etc
You can access the admin panel by running /coffeetime admin. This lets you force-run CoffeeTime, add and remove subscribers, mass subscribe all users, etc
- Uninstall the test app from your test Slack
- In your test app's Glitch env, open Console and:
cd .data
rm coffee.json
rm db/teams/*
refresh
- Reinstall the test app