Skip to content

Commit

Permalink
Merge pull request #32 from NitorCreations/info
Browse files Browse the repository at this point in the history
Info
  • Loading branch information
Jurzo authored May 13, 2022
2 parents 2db6f8d + 0aa0b29 commit cc61bf2
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 7 deletions.
53 changes: 46 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file added images/AppHome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/EnableEvents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/event-sub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/groups-command.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/interactivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/name.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/oauth-token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/signing-secret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cc61bf2

Please sign in to comment.