Discord bot used by Nitrox team.
- Ask for the Discord bot token (as opposed to reset)
- Create "appsettings.Development.json" file and set the
Token
+GuildId
. See below for appsettings.json template. - Add the bot to your private server by following the steps (bot invite URL is generated here): https://discord.com/api/oauth2/authorize?client_id=405122994348752896&permissions=17179943952&scope=bot
- Deploy the bot or run it locally in development mode for testing.
- With the Rider IDE you can connect to a docker host via SSH to push & build the container remotely.
- To build it from CLI, see below.
- Build the docker container:
docker build --tag nitroxdiscordbot:latest -f ./NitroxDiscordBot/Dockerfile .
- Run the docker container:
docker run --name nitroxdiscordbot nitroxdiscordbot:latest
- Purging channels of "old" messages (configure with
/cleanup
) - Auto respond to user messages (configure with
/autoresponse
) - Submits to a Ntfy server on a topic with same name as the Auto Response
- Sqlite database - which is stored in
/app/data/nitroxbot.db
. Docker mount the/app/data
directory somewhere on your host to reuse the database. Otherwise, the database is gone when the docker container is deleted and you need to reconfigure the bot again.
{
"Token": "DISCORD_TOKEN_HERE",
"GuildId": MY_SERVER_ID_HERE,
"Developers": [MY_DISCORD_USER_ID],
"Ntfy": {
"Url": "URL TO NTFY HERE"
}
}
- GuildId is needed as this bot is meant to manage only 1 server at a time.
- Developers field is optional but gives you super admin access to the commands of the bot, no matter the Discord server.
- Ntfy configuration is optional. If invalid, Ntfy submits will be skipped.