-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SLACK_SIGNING_SECRET=1234 | ||
SLACK_BOT_TOKEN=xoxb-1234 | ||
SLACK_APP_TOKEN=xapp-1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,20 @@ | ||
# randopicker | ||
# Select a random member from a channel | ||
Use either the `/rando` slash command to use the pre-coded text or use the Workflow Builder "step from app" with the channel the workflow is called from and the user who called it. Then make a step to have a message using the Random User. | ||
|
||
This is set up to exclude the user who called the command or workflow as well as excluding all apps and bots. | ||
|
||
## Installing | ||
|
||
**Create Slack App** | ||
1. Open [https://api.slack.com/apps/new](https://api.slack.com/apps/new) and choose "From an app manifest" | ||
2. Choose the workspace you want to install the application to | ||
3. Copy the contents of [manifest.yml](manifest.yml) into the text box that says `*Paste your manifest code here*` and click *Next* | ||
4. Review the configuration and click *Create* | ||
5. Now click *Install to Workspace* and *Allow* on the screen that follows. You'll be redirected to the App Configuration dashboard. | ||
|
||
**Environment variables** | ||
Before you can run the app, you'll need to store some environment variables. | ||
|
||
1. Copy `.env.sample` to `.env` | ||
2. Open your apps configuration page from [this list](https://api.slack.com/apps), click *OAuth & Permissions* in the left hand menu, then copy the *Bot User OAuth Token* into your `.env` file under `SLACK_BOT_TOKEN` | ||
3. Click *Basic Information* from the left hand menu and follow the steps in the *App-Level Tokens* section to create an app-level token with the `connections:write` scope. Copy that token into your `.env` as `SLACK_APP_TOKEN`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
_metadata: | ||
major_version: 1 | ||
minor_version: 1 | ||
display_information: | ||
name: RandoPicker | ||
features: | ||
app_home: | ||
home_tab_enabled: false | ||
messages_tab_enabled: true | ||
messages_tab_read_only_enabled: true | ||
bot_user: | ||
display_name: RandoPicker | ||
always_online: false | ||
slash_commands: | ||
- command: /rando | ||
description: Pick a rando | ||
should_escape: false | ||
workflow_steps: | ||
- name: Get a Random Channel Member | ||
callback_id: get_random_member | ||
oauth_config: | ||
scopes: | ||
bot: | ||
- channels:read | ||
- chat:write | ||
- chat:write.public | ||
- commands | ||
- groups:read | ||
- groups:write | ||
- workflow.steps:execute | ||
- users:read | ||
settings: | ||
event_subscriptions: | ||
bot_events: | ||
- workflow_step_execute | ||
interactivity: | ||
is_enabled: true | ||
org_deploy_enabled: false | ||
socket_mode_enabled: true | ||
token_rotation_enabled: false |