Skip to content
Logicguy edited this page Feb 14, 2023 · 7 revisions

Welcome to the discox wiki!

Here we will document how to interact with the incredibly efficient discord py framework build by the v1rbox community :D

Tho before we start lets get you up and running with your own running discord bot :o

Getting the bot token

  1. Follow the instructions here to add a Discord Bot to your test server.
  2. After the bot is added clone the project repo.
  3. Copy the Bot Token from Discord Developer Portal.

How to setup with poetry (very simplified)

  1. Install poetry (pip install poetry) and GNU make (should came with most linux distros or if windows then you can install it with winget by winget install -e --id GnuWin32.Make)
  2. Clone Discox's repository
  3. Run make init
  4. Setup the database, see setting-up-the-mysql-database.
  5. Edit .env file with example provided in .env.example, see configuring-the-bot.
  6. Run your bot up with make run
  7. If you want to add your own dependencies you could with poetry add <package> like pip
  8. Read wiki for how to create commands et cetera.

Setting up the MySQL database

The bot relies on a MySQL database to function, to set it up you want to download MySQL / mariaDB

Then simply start / enable it with systemd

stsystemctl start mariadb

The client expects a user root@localhost. It will automatically set everything up from there when running for the first time. It will make a database schema discox.

Configuring the bot

Any settings in the bot that are not global will be located in the /.env file. This file is by default not tracked by git so you have to make it yourself and setup the variables as such. A template is located at /.env.example.

DISCOX_TOKEN=

This is your discord bots token. It is what the bot will login with.

DISCOX_PREFIX=

The prefix the bot will use, the official bot uses v! but you can set this to anything to match your needs.

DISCOX_REPORT_ID=

This is the ID of the reports forum channel. This can be left empty if not needed.

To get the ID of a channel or role you want to enable developer mode in User Settings » Advanced » Developer Mode

DISCOX_MOD_ROLE_ID=

This is the ID of the role that allows moderators to use the moderational commands. To enter multiple roles split them by a ,

DISCOX_TEMP_CHANNEL=

Channel ID of a private temporary channel that only the bot has access to. This is used if the bot needs to send a temporary message, it is recommended to mute this channel.

DISCOX_CHANNEL_ID=

The YouTube channel that you want the bot to monitor for new uploads. See this on getting a YouTube channel ID.

DISCOX_ROLE_CHANNEL=

The is the whitelisted channel ID where role related commands are allowed to be used.

DISCOX_YOUTUBE_ANNOUNCEMENT_ID=

The channel ID where YouTube announcements are dropped.

DISCOX_STARBOARD_CHANNEL=

The starboard channel id. Pretty self explanatory.

MYSQL_LOGIN=

The password for root@localhost in the MySQL database.

After setting up the environment, you can now work with it in the test servers with make run.