Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hrkings/discordnetbottemplate

A fully dockerized and ready to run Discord bot template written in C# using .NET 6 and Discord.NET
https://github.com/hrkings/discordnetbottemplate

boilerplate bot csharp discord discord-bot discord-bot-boilerplate discord-bot-template docker dotnet dotnet-5 dotnet-6 dotnet-core template

Last synced: about 2 months ago
JSON representation

A fully dockerized and ready to run Discord bot template written in C# using .NET 6 and Discord.NET

Awesome Lists containing this project

README

        

# Discord.NET Bot Template

This repository contains a complete Discord Bot written in C# using the Discord.NET framework. Feel free to clone it or create your own repository from the template. Expand it as much as you want. The project uses dependency injection and comes ready with ping and help commands. Enjoy!

## Running with Docker

The project is already dockerized and can be run using the following command:

```bash
docker-compose up -d
```

The bot is setup to pick important things from environment variables:

- The token comes from `DISCORD_BOT_TOKEN` variable and needs to be changed
- The status comes from `DISCORD_BOT_ACTIVITY` variable and will default to `I'm alive!` if not changed
- The prefix comes from `DISCORD_BOT_COMMAND_PREFIX` variable and will default to `!` if not changed

I recommend looking into the dockerfile and docker-compose file, they are realy simple and can be expanded upon.

## Running without docker

If you wish to run without docker, you cna use your IDE or the command:

```bash
dotnet run
```

Just remember to set the environment variables.