This is a counting bot for the #counting channel in slack.
- Firstly, download and install the latest version of the .NET SDK from here.
- Download the latest version of the .NET runtime here.
(If you already have the SDK and runtime installed you can skip to this step.)
- Clone the repository with
git clone
or through Github Desktop. - CD to the project directory with the terminal of your choice, and run
dotnet restore
.
- With the terminal of your choice, CD to the project directory and run
dotnet build -c Release
.
- With the terminal of your choice, CD to
./bin/Release/net6.0
- Run the command
dotnet CountVonCount.dll
You can generate one by changing the preprocessor directives at the top of Program.cs
.
The top of file should look like this:
#define WRITE_KEY
// #define RUN_BOT
Rebuildng the program and running it will prompt you with inputs.
-
For the first one, enter
bot
-
For the second one, paste the Bot User OAuth Token from slack (it should start with xoxb) into the second input.
(When you are finished make sure to restore the preprocessor directives to the way they were.)
You can create a slack classic app here. Follow the websites instructions to setup the OAuth scopes of the bot. It should have the following permissions:
- bot
- admin
- channels:history
- channels:read
- chanels:write
- chat:write:bot
- commands
- emoji:read
- files:read
- reactions:read
- reactions:write