Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Build & Configure

David edited this page May 17, 2021 · 7 revisions

Directory structure

At the end of the configuration, your directory should look like this
Folder Strucure

Credentials

In order to use Shadbot, you will need to create a file named credentials.properties located in the same directory as the compiled .jar.
This file contains all the credentials (secrets and API keys) that Shadbot may use.
The only credential required for the bot to work is DISCORD_TOKEN, other credentials are optional.

⚠️ WARNING
If a credential is not specified, the associated command/service will not work properly and will error if used.

The example below shows the content of the credentials.properties file.
Replace ... with the corresponding value.

DISCORD_TOKEN=...
BLIZZARD_CLIENT_ID=...
BLIZZARD_CLIENT_SECRET=...
DEVIANTART_CLIENT_ID=...
DEVIANTART_API_SECRET=...
FORTNITE_API_KEY=...
OPENWEATHERMAP_API_KEY=...
STEAM_API_KEY=...
WALLHAVEN_API_KEY=...
DISCORD_BOTS_DOT_GG_TOKEN=...
TOP_DOT_GG_TOKEN=...
TOP_DOT_GG_WEBHOOK_AUTHORIZATION=...
TOP_DOT_GG_WEBHOOK_PORT=...
DISCORDBOTLIST_DOT_COM_TOKEN=...
BOTLIST_DOT_SPACE_TOKEN=...
BOTS_ONDISCORD_DOT_XYZ_TOKEN=...
WONDERBOTLIST_DOT_COM_TOKEN=...
BOTSFORDISCORD_DOT_COM=...
DISCORD_DOT_BOATS=...
DISCORDEXTREMELIST_DOT_XYZ=...
SENTRY_DSN=...
IPV6_BLOCK=...
PROMETHEUS_PORT=...
DATABASE_USERNAME=...
DATABASE_PWD=...
DATABASE_HOST=...
DATABASE_PORT=...

Database

Shadbot uses MongoDB to store data.
In order to run the bot, you need to install MongoDB Community Edition.
You can use a local or a remote database. In the second case, you need to provide all the credentials starting with DATABASE_.

Sentry (optional)

Shadbot uses Sentry to report bugs.
To use Sentry, you need to set the SENTRY_DSN credential.
You can then configure it in the Sentry Service class.

Prometheus (optional)

Shadbot uses Prometheus combined with Grafana to keep track of what is happening.
This is really helpful to get statistics in real time and see if something is going wrong.

Configuration

You can also customize the bot by modifying the project.properties file.