Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 1.11 KB

SETUP.md

File metadata and controls

10 lines (7 loc) · 1.11 KB

What You'll Need

Step 1: Add a Slash Command Configuration

On the Slash Commands page select 'Add Configuration', set the Slash Command you want to use, for our example app, this should be /roll. You can set it to anything, so long as you update the handler for it too in the project (see below). For the 'URL' value, use your project's publish URL (Click 'Show'), this has the format 'https://project-name.glitch.me', so in our example app it is 'https://roll.glitch.me'. Leave the method to the default 'POST' value and set the other values as you need to, but be sure to copy the Token value for use in the next step.

Step 2: Copy the Command Token

Copy the token value for the Slash Command into the .env file in your project. You'll see an entry for SLACK_TOKEN. Paste the token against that variable name.

That's all of the setup required to get the Slash Command working. To try it out, type the slash command /roll <title> | <option1>, <option2>, <option3>, and it'll output one of the options randomly chosen.