Rewrite of devanoobot in C#
- Clone this repo
- Go to "Your Apps" on the Slack API site
- Click the green "Create New App" button.
- Give the app a unique name (such as "devanoobot-brb3-dev"), and select the appropriate workspace.
- Click "Create App".
- Back in the source code, copy the
appsettings.json
file toappsettings.local.json
. - From your app settings in Slack, copy the "Signing Secret" to
Slack:SigningSecret
in yourappsettings.local.json
. - Copy the "Verification Token" to
Slack:VerificationToken
in yourappsettings.local.json
. - From the left hand navigation, select "Oauth & Permissions".
- Scroll down to "Scopes" and add the Scopes needed for developing the feature you are working on.
- Scroll back to the top and click "Install App to Workspace", then follow the instructions for installing the application.
- Copy the provided Oauth token to
Slack:OauthToken
in yourappsettings.local.json
. - From the left hand navigation, select "Socket Mode". Click "Enable Socket Mode" and create a key.
- Copy the key from the previous step to
SlackSocket:AppToken
in yourappsettings.local.json
.
You are now ready to build and run the application.
Work on changes in a branch, and create a PR when you are ready to merge.
Please note in your PR what scopes are used by your feature, and any Slack App configuration needs to be made.
Also, be careful not to commit your appsettings.local.json
into the repository.
When creating new Commands in Slack, be sure to add a unique suffix to the command to prevent collisions with
the production devanewbot. For example, when working on the /stallman
command, I configure my Slack app to have
a /stallman-brb3
command. In my appsettings.local.json
, I add -brb3
to SlackSocket::CommandSuffix
.
This allows the CommandService to route Socket messages to the correct command.