zobweyt/Discord.Net.Template
A template for building scalable and ready for production Discord.NET apps within the .NET ecosystem (https://discord.com)
Discord.Net.Template
A template for building scalable and ready for production Discord.NET apps within the .NET ecosystem.
๐ฆ Usage
To start, open a command prompt and follow these instructions:
Step 1 โ Get the template
Use this repository as a template, open it in your editor, and navigate to the startup project:
cd src/TemplateStep 2 โ Configure the environment
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.
Step 3 โ Run the app
To run the bot, just execute the following command:
dotnet watchThe 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.
๐จ Customization
Here is what you can also do:
- Find and replace all occurrences of "template" to fit your app's name.
- Rewrite the
README.mdfile 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.
๐งช Testing
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๐ Contributing
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.
โค๏ธ Acknowledgments
See the contributors who participated in this project and the dependencies used.
๐ License
This project is licensed under the MIT License โ see the LICENSE.md file for details.