Rewrite of devanoobot in C#
- Replace current devanoobot functionality
- Connect to reddit for automated posting to /r/devanooga
- Implement custom
/command
s
- 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.Development.json
. - From your app settings in Slack, copy the "Signing Secret" to
Slack:SigningSecret
in yourappsettings.Development.json
. - Copy the "Verification Token" to
Slack:VerificationToken
in yourappsettings.Development.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.Development.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.Development.json
into the repository.
If your feature needs access to webhooks, you will need to install ngrok.
A sample ngrok configuration can be found in the ngrok.sample.yml
file.
Be sure to update the authtoken and subdomain to match your configuration.
Webhooks should verify the validity of the Slack webhook using SlackDotNet.Slack.ValidWebhookMessage()
before acting
on them.