/Discord.Net.Template

A template for building scalable and ready for production Discord.NET apps within the .NET ecosystem (https://discord.com)

Primary LanguageC#MIT LicenseMIT

Discord.NET Logo

Discord.Net.Template

A template for building scalable and ready for production Discord.NET apps within the .NET ecosystem.

Dependencies Size Creation Date

๐Ÿ“ฆ 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/Template

Step 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 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.

๐ŸŽจ Customization

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.

๐Ÿงช 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.