Omnipotent guild management bot for FIRST Discord servers
run python -V
to find what version of python you are running. If you are running version 3.8 or newer, feel free to skip this section
run python -V
to ensure that version 3.8 or newer is installed.
Many distributions do not have python 3.8 in their repositories yet. If this is the case for you, then pyenv is a great option for managing different python versions.
Instructions for installing are located here.
pyenv install 3.8.2
downloads and builds a newer version of pythonpyenv global 3.8.2
sets 3.8.2 as the primary version for the current userpython -V
to ensure that version 3.8 or newer is installed. Through the rest of this README, we will assume that you have found the correct python
executable for your setup and are using it accordingly.
As of May 13, 2020 , Dozer no longer supports database types other than PostgreSQL. This means installations using SQLite (as was default), will need to migrated, as well as new installations will have to have PostgreSQL installed on the machine for development or production. You can install PostgreSQL for your platform here
Go to the Discord Developer Portal and create a new application by clicking the button. Enter a name for the application when prompted.
Create a bot user inside of your application. In the settings menu, go to the "Bot" menu.
Within the bot menu, select the "create bot user" option.
Copy the bot user token (seen in the image below) - We'll need that later! Do not share your token with anyone. If someone obtains your bot user token, they gain full control of your bot. Be careful!
Within your bot user settings, make sure both "intents" settings are enabled.
Setup configuration options:
If you are using Docker, download and install it for your platform here. Additional documentation can be found here, if needed.
Open your command line/terminal interface and go to the directory where Dozer's code is located.
cd "path/to/directory"
.
Alternatively, on Windows, go to the directory in the File Explorer app. Click the bar that is circled in the image below and type cmd
. Press enter and the command line should open up within that directory. Also, you can use an integrated terminal with an IDE of your choice.
Install dependencies with python -m pip install -Ur requirements.txt
in your command line interface.
python
with python3
.Run the bot once with python -m dozer
. This will crash, but generate a default config file.
Add the Discord bot account's token to discord_token
in config.json
If you have a Google Maps API key, a Blue Alliance API key, an Orange Alliance API key, a Twitch API client ID and client secret, and/or a Reddit client ID and client secret, add them to the appropriate places in config.json
. For more details on how to get these API keys, see this file for instructions. If you don't, your bot will still work, but you won't be able to use the commands that rely on these tokens.
If you are using Docker, you most likely won't have to do anything. Otherwise, add your database connection info to db_url
in config.json
using the following format:
postgres://user:password@host:port
Replace host
with your database IP, or localhost
if it's on the same PC. port
is by default 5432. If the user has no password, you can remove the colon and password. The default user for the above installation is postgres
, however we strongly suggest making a dozer
user for security reasons using this guide.
Add your Discord user ID, and anyone else's ID who should be able to use the developer commands, to the list developers
in config.json
The default command prefix is &. If this is already in use on your server or you would like another prefix, you can change the prefix
value in config.json
.
To configure lavalink:
config.json
to that name. For example, in the following image below, the config.json file should say "host": "dozerRecent_lavalink_1"
. Set the port
value to the port that's listed in docker-compose.yml
.host
and port
values to which values that you have set up.docker-compose up
twice in your command line interface. If you are setting it up manually, repeat the command in step 4. You should see Signed in as username#discrim (id)
after a few seconds.docker-compose up
, you are building it and the bot won't go online. Once the building process seems to be done, press ctrl+C and run the command again.Signed in as
message is pretty far up, as seen highlighted in orange in the image below.{prefix}restart
and it should work.
Within the scopes menu under OAuth2, select the "bot" scope
A new "permissions" menu should appear below. Select all the permissions that you want your instance of Dozer to have. If you want all permissions and you trust your instance wholeheartedly, select "Administrator"
The bottom of the scopes menu should have a URL. Copy and paste that URL into a new tab in your browser. It'll open a page where you can invite a bot to your server.
Dozer requires Postgres. You can set up Postgres on your own server or use a service such as ElephantSQL. To make it work in Dozer,
install the psycopg2 pip package, then change the db_url
key in config.json
to a URL that follows this format:
postgresql://username:password@host/db_name_in_postgres
with the correct information filled in.
pip install pylint
, if it is not already installed. pip install pre-commit
pre-commit install