A simple Discord bot for posting xkcd comics written in C# and .NET 6.0
You need to have dotnet installed on your system
dotnet restore "xkcd-bot/xkcd-bot.csproj"
dotnet build "xkcd-bot.csproj" -c Release -o /app/build
dotnet publish "xkcd-bot.csproj" -c Release -o /app/publish /p:UseAppHost=false
cd xkcdc-bot/xkcd-bot/app/publish
Place the config.json file with your bot token in the same directory as the executable
You can find a template for the config.json in xkcd-bot/xkcd-bot/config.json
dotnet xkcd-bot.dll
cd xkcd-bot/xkcd-bot
docker build -t xkcd-bot .
docker run -d -v /path/to/config.json:/app/config.json --name xkcd <image-id>
[Prefix]
can be configured in config.json
[Prefix]show <id>
Show specific xkcd.
[Prefix]latest
Show latest xkcd comic.
[Prefix]random
Show a random xkcd comic.
[Prefix]help
Show this help message.