diff --git a/README.md b/README.md index f3dbee9..35beba3 100644 --- a/README.md +++ b/README.md @@ -30,15 +30,54 @@ This project is a Slack application that helps users join and leave user groups. ### Prerequisites -This is an example of how to list things you need to use the software and how to install them -* npm - ```sh - npm install npm@latest -g - ``` +To run the bot locally you need either a Java runtime or Docker installed along with ngrok to ge a tunnel for getting a public url. -### Installation -- PLACEHOLDER +## Installation + +## Setup bot on Slack's [website](https://api.slack.com/apps) +First create a new app from the link above and give it a name and a workspace where it will be working in. + +![new](images/new.png) + +![name](images/name.png) + +After creating the bot, scroll down to the App Credentials in **Basic Information.** The Signing Secret is used in the env file. + +![signing-secret](images/signing-secret.png) + +Then go to the **OAuth & Permissions** tab and scroll down. Add the following permissions for this bot to work. + +![permissions](images/permissions.png) + +On the same tab, scroll up to the OAuth Tokens section and press Install to Workspace. Allow all permissions. The Token will be used in the env file. + +![oauth-token](images/oauth-token.png) + +Next navigate to the **App Home** tab and enable all three settings. You can also change the bot's name here. + +![AppHome](images/AppHome.png) + +Now, run the bot (and ngrok if needed and keep note of the URL) before setting up the rest of the bot functionality. + +Got to the **Event Subscriptions** tab and write the URL where your VM is accessible (either the ngrok URL or your own public one) with the **/slack/events** endpoint specified. Then scroll down to **Subscribe to bot events** and add "app_home_opened" and "app_mention" to the bot events. + +![EnableEvents](images/EnableEvents.png) + +After that, copy that same URL to the Request URL in **Interactivity & Shortcuts**. You may need to enable Interactivity to see this view. + +![interactivity](images/interactivity.png) + +Then create a new command in the **Slash Commands** tab with the **Create New Command** button. + +![commands](images/commands.png) + +The command should be **\*/groups\*** and the URL the same as before. The rest of the options don't matter in regards of the bots functionality. + +![groups-command](images/groups-command.png) + +Now just invite the bot to a channel with **@APPNAME** where you want to use it. + ### Running the image diff --git a/images/AppHome.png b/images/AppHome.png new file mode 100644 index 0000000..bad9cd5 Binary files /dev/null and b/images/AppHome.png differ diff --git a/images/EnableEvents.png b/images/EnableEvents.png new file mode 100644 index 0000000..3e22c34 Binary files /dev/null and b/images/EnableEvents.png differ diff --git a/images/commands.png b/images/commands.png new file mode 100644 index 0000000..bc06c08 Binary files /dev/null and b/images/commands.png differ diff --git a/images/event-sub.png b/images/event-sub.png new file mode 100644 index 0000000..fb23640 Binary files /dev/null and b/images/event-sub.png differ diff --git a/images/groups-command.png b/images/groups-command.png new file mode 100644 index 0000000..8bf6696 Binary files /dev/null and b/images/groups-command.png differ diff --git a/images/interactivity.png b/images/interactivity.png new file mode 100644 index 0000000..06266fb Binary files /dev/null and b/images/interactivity.png differ diff --git a/images/name.png b/images/name.png new file mode 100644 index 0000000..c985eb7 Binary files /dev/null and b/images/name.png differ diff --git a/images/new.png b/images/new.png new file mode 100644 index 0000000..43d1efc Binary files /dev/null and b/images/new.png differ diff --git a/images/oauth-token.png b/images/oauth-token.png new file mode 100644 index 0000000..f822ff4 Binary files /dev/null and b/images/oauth-token.png differ diff --git a/images/permissions.png b/images/permissions.png new file mode 100644 index 0000000..6df70ad Binary files /dev/null and b/images/permissions.png differ diff --git a/images/signing-secret.png b/images/signing-secret.png new file mode 100644 index 0000000..04376d0 Binary files /dev/null and b/images/signing-secret.png differ