Important: You must use Python 3.8 for the setup!! If you use an earlier or later version, things WILL break. It's not just convenient to be on the same version as us, it's mandatory.
- Install Git
- Install Python 3.8
- Familiarize yourself with how to use a command prompt and Git Bash (if you can't do this you will have a bad time)
Red's Installation Guide is a useful resource if you're a first timer.
I suggest using PyCharm Community for development. Change into the
PycharmProjects
directory and clone your fork of the repo:
Fork this repo (you are probably already on the page, but if not go here).
Note: If you are developing a cog that is in the misc-cogs repo, you may need to complete some steps for both pad-cogs AND misc-cogs.
You will need a GitHub account to do this. Click the button that says "Fork" in the upper-right-hand corner of the page.
Git clone your forked repository.
If you don't have one already, follow the instructions to create a bot in Red's official documentation:
Keep the bot token
that you get from Discord at the end of the instructions handy - you will need it to set up the bot later.
- Clone this repo (fork if you're contributing)
- Create a python 3 venv.
virtualenv -p python3 <envname>
- Activate the venv.
pip install -r requirements.txt
The above steps install Red automatically. You can now follow the Red instructions to startup the bot:
Setting Up and Running Red (macOS)
In command line:
redbot-setup
redbot <bot_name>
The rest of the guide takes place from inside Discord. Replace ^
with your prefix to talk to your bot.
Once the bot is launched, set it to use your repo directory as a cog path. Type this in Discord where the bot is:
^addpath path/to/repo/root
e.g
^addpath /Users/Tsubaki/src/pad-cogs
Note: you may have to do this for
pad-cogs
,core-cogs
, andmisc-cogs
. If you have forked and cloned core & misc cogs, this process is the same! However, if you are only developing inpad-cogs
, and installingcore-cogs
&misc-cogs
from remote repos then:
^load downloader
(this cog is always installed by default)^repo install misc https://github.com/TsubakiBotPad/misc-cogs
^repo install core https://github.com/TsubakiBotPad/core-cogs
- Now you can install, for example, the
menulistener
cog with^repo install core menulistener
. Themenulistener
cog is what makes the^id
menus interactive instead of single-panel static screens with unusable emoji below them.
Load relevant cogs (whichever cogs you are developing, dbcog
, and padinfo
) using the ^load
command.
Note: We suggest you load
dbcog
andpadinfo
so that you will have something to test that your bot installation correctly installed; however, if your development does not involve dbcog as a dependency, you may want to keep it unloaded (^unload dbcog
, get it back with^load dbcog
at any time), simply because it is very slow for the bot to initialize dbcog on startup, and you might be restarting your bot a lot during development, e.g. if you ever need to edit or update a library.
Syntax: ^load <cog 1> ... <cog n>
e.g
^load dbcog padinfo
You can see which cogs you have loaded using the ^cogs
command.
You should now be able to run basic commands like ^id
^id tsubaki
Should return something like:
Happy developing!
- Use
^traceback 1
if you encounter any errors to display them in discord.
You may have noticed that emojis are replaced with placeholders in some commands. This is because the bot does not have access to the specific emojis.
-
If you are doing in-depth development of the
^id
command, your bot will need to be invited to the emoji servers. Talk to River to get access to these servers. -
Once you and your bot have joined the servers, use
^padinfo emojiserver add <server_id_1> ... <server_id_n>
with the IDs she gives you.
Most cogs here relate to the mobile game 'Puzzle & Dragons'.
Cog | Purpose |
---|---|
azurlane | Azur Lane card lookup |
crowddata | Crowdsourced data collection |
crud | Database editor. Not useful for bots other than prod Tsubaki |
dbcog | Central cog to host all PAD data |
dungeoncog | A cog to search and get info for dungeons |
damagecalc | Simple attack damage calculator |
feedback | A specialized feedback cog for Tsubaki specifically |
monidlistener | A listener to give info for monster ids |
padboard | Converts board images to dawnglare board/solved board links |
padbuildimg | Creates images of PAD teams via a special query language |
padbuilds | See user-made builds for dungeons i think??? (nobody uses this) |
padevents | A scheduler cog to help players see upcoming daily GH dungeons. |
padglobal | Global PAD info commands |
padle | A wordle-inspired monster guessing game |
padinfo | Monster lookup and info display |
padmonitor | Keeps an eye out for PAD updates |
pipelineui | Interface for running the pipeline (Tsubaki-only) |
pricecheck | Lumon's thing. Something about stamina trade equivalence |
profile | Global user PAD profile storage and lookup |