Discord .NET template bot is a project utilizing Discord.NET library to create a Discord bot using .NET ecosystem.
The entire focus of the project is to create a usable template by anyone who just wants to dive in and start coding commands, without the need to set the entire application.
- .NET 8 SDK
- Discord bot
💡 Create Your bot on Discord developer portal
- Discord account and server (guild)
- to test the actual bot
- use this repository as a template repository
- rename solution
- rewrite README.md file
- adjust configurations in
Discord.BotConfiguration -> ServiceCollectionExtensions -> GetDiscordSocketConfig
to Your needs - adjust configurations in
Discord.Commands -> ServiceCollectionExtensions -> GetCommandServiceConfig
to Your needs - try running the project
If everything works -> commit and You're good to go 🎉
- running as a service using the .NET generic host
- Serilog logging
- Discord.NET library as the application core
- clone the repository
- setup Discord bot token
- open the
appsettings.json
- locate the
DiscordBotConfiguration
section - locate the
Token
field and fill in Your Discord bot token
- open the
- run the project
- choose the appropriate launch configuration
- hit the run button in Your IDE or use the command:
dotnet run
Your bot should be up and running! 🎉
By default this repository implements two simple slash commands.
While Your bot is currently up and running, You can go test these commands to see if everyting works fine and You're good to go coding. 😊
⚠️ If You're getting an error that the interaction couldn't be completed within 3 seconds, synchronize Your system clock on Your computer.
🚀 Excited to contribute? Fantastic! Here's how You can get involved:
Found a bug or have a suggestion? Open an issue. Feedback is highly valued!
Explore the open issues, find one that aligns with Your skills or interests, and tackle it.
Want to add a new feature or fix a bug? Fork the repository, create a new branch, make your changes, and submit a pull request. Clean, readable, and efficient code will be appreciated. 🙏