Discord Cat Bot Source Code
- Python 3
- Git (optional)
-
Clone the repository. You can use green "Code" button at the top or a git command:
git clone https://github.com/milena-kos/cat-bot.git
-
Install requirements:
pip install -r requirements.txt
-
Create a
db.json
file. Here is a template of an empty db:{"cat": {}, "summon_ids": [], "0": {}, "cattype": {}}
Note Cat Bot doesn't use that file and instead migrates it to
data
folder. -
Go inside of the
main.py
file, on first few lines you can change some config values, such as guild ID, backup channel ID, etc
Note
You will need to create a guild and upload all emojis to that guild, making sure your bot can view the guild. You can download all the emojis here
-
Go inside
bot.py
file and add your bot token. -
Run the bot with
python bot.py
-
Done!
Most stuff can be customised by just using CTRL+F in main.py, but im gonna explain some stuff you might be intereted in.
Add your cat type name to type_dict
dictionary near the top of the main.py file, the same way it is already written. (number is the chance, lower = rarer)
Note
Emojis are automatically grub from your guild, you will need to upload the emoji with a name of:
<your cat name all lowercase> + cat
Example:
supercat
Identical to the last section, you will have to add an emoji to your guild.
Then, run:
cat!custom <user id> <custom cat name>
Example: cat!custom 966695034340663367 Nerd
Go inside battlepass.json
, and modify the levels there.
For each line there is 4 parameters:
"req"
: action you need to do to get the level. Can becatch
,catch_type
, orcatch_fast
"req_data"
: the secondary value to the requirement. Amount of cats forcatch
, amount of seconds forcatch_fast
, or a cat type forcatch_type
"reward"
: cat which will be given after completing the level"reward_amount"
: amount of cats for completing the level
Note
ALWAYS leave 2 empty levels at the end of your battlepass.
Go inside aches.json
, and add an achievement.
The fields should be self-explanatory.
Unlike battlepass levels, you will need to actually code the achievement.
Good luck, I believe in you.
Cat Bot is licensed under Creative Commons Zero v1.0 Universal license. View LICENSE
for more information.