Discord Cat Bot Source Code
Please note that self-hosting is hacky and isn't supported; instructions below are for testing/development/messing around. I won't stop you, but you WILL have to mess around with the code a bunch for it to work good, so be warned.
- Python 3.10+
- PostgreSQL
-
Clone/download the repository.
-
pip install -r requirements.txt(use venv if desired) -
You can add all the emojis you want with
python emojis.py(needs yourTOKENconfigured first, see step 6). Alternatively, download the emojis and upload them to "App Emojis" in Discord Dev Portal by hand.emojis.pycan also download optional themed spawn emoji sets (birthday, halloween, old) - enable the ones you want in theSPAWN_EMOJI_THEMESdict at the top of the file, then setconfig.EMOJIto match. -
Setup your Postgres: (example instructions)
CREATE ROLE cat_bot WITH LOGIN PASSWORD 'password'; CREATE DATABASE cat_bot OWNER cat_bot;psql -U cat_bot- Copy-paste everything from
schema.sql.
-
Configure the bot inside
config.pyfile. Most things are optional. You can hardcode the values if you don't want to use environment variables. -
Run the bot with
python bot.py.
Cat Bot is licensed under GNU Affero General Public License v3.0 license. View LICENSE for more information.
CatPG, our custom-made asyncpg wrapper, is licensed under MIT License instead. The license text is present in the beginning of catpg.py file.
