A template for building scalable and ready for production Discord.NET apps within the .NET ecosystem.
To start, open a command prompt and follow these instructions:
Use this repository as a template, open it in your editor, and navigate to the startup project:
cd src/Template
We are using the options pattern for typed access to groups of related settings. You should configure the appsettings.json
file or manage user secrets via CLI:
dotnet user-secrets set <key> <value>
Note
Pending database migrations are applied automatically before startup and an informational message is logged.
To run the bot, just execute the following command:
dotnet watch
The initial setup is done. Enjoy using the template! 🎉
Warning
Instead of using the dotnet run
in production, create a deployment using the dotnet publish
command and deploy the output.
Here is what you can also do:
- Find and replace all occurrences of "template" to fit your app's name.
- Rewrite the
README.md
file to fit your needs. - Follow the TODO comments across the entire solution.
Tip
Take a look at the discord-md-badge project which is a customizable badge that shows your or a bot account status, or a server invite.
This project utilizes the xUnit framework for creating test cases. It also incorporates Moq for mocking objects and Bogus to generate fake data.
To run all the tests, execute the following command from the root directory in your command prompt:
dotnet test
To contribute to this project, please read the CONTRIBUTING.md
file. It provides details on our code of conduct and the process for submitting pull requests.
See the contributors who participated in this project and the dependencies used.
This project is licensed under the MIT License — see the LICENSE.md
file for details.