A discord bot for spinning a wheel of fortune. I will not be hosting a public version of this bot.
| Command | Description |
|---|---|
| /add | adds an option to the wheel |
| /rm | removes an option from the wheel |
| /preview | generates a still image of the current wheel |
| /randomize | randomize the order of all the options |
| /spin | generates a gif of a spinning wheel that lands on a random option |
| /reset | clears all options from the wheel |
Renaming a channel will clear the wheel in the current version as it is stored based on the name of the channel rather than the ID.
example with 6 options, randomized
Download and install Visual Studio 2022 or VS Code with the c# extension
You can also install these using winget by running
winget install --id Microsoft.VisualStudio.2022.Community
or
winget install --id Microsoft.VisualStudioCode
Download and install azurerite by running (requires npm)
npm i -g azurite
This will install the azure storage emulator globally. Also make a folder somewhere for the storage, I will be using 'D:/Azurite' as an example.
(Optional) If you want to be able to explore the contents of the storage emulator download
Azure Storage Explorer (The download is from the Operating System dropdown button) or run
winget install --id Microsoft.Azure.StorageExplorer
Go to the Discord developer portal (https://discord.com/developers/applications) and register a new application.
- Open the new application and navigate to the "Bot" page
- Generate a new bot token by clicking the "reset token" button
- Open the WheelBot.sln from this repo with your preferred IDE.
- Add the token to userSecrets (You can add an extension for this in VS code):
- Right click the project file "WheelBotApiApp.csproj" > "Manage User Secrets"
- Add your generated token to the secrets like this
{"BotToken": "Your_Token_Here"}
- Navigate to "OAuth2/General" and add
https://localhost:7055as a redirect url - Navigate to "OAuth2/URL Generator", select 'applications.commands.permissions.update' and the redirect url. Copy the url and use it to add the bot to a server.
- Run the command
azurite -s -l D:/Azuriteto start the storage emulator. - Open the WheelBot.sln from this repo with your preferred IDE.
- Start the project
With everything set up correctly this should make the bot go online on discord.
