Skip to content

Repository files navigation

Cat Bot PFP Cat Bot top.gg Discord Server Wiki

Discord Cat Bot Source Code

Development

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.

Prerequisites

  • Python 3.10+
  • PostgreSQL

Instructions

  1. Clone/download the repository.

  2. pip install -r requirements.txt (use venv if desired)

  3. You can add all the emojis you want with python emojis.py (needs your TOKEN configured first, see step 6). Alternatively, download the emojis and upload them to "App Emojis" in Discord Dev Portal by hand.

    emojis.py can also download optional themed spawn emoji sets (birthday, halloween, old) - enable the ones you want in the SPAWN_EMOJI_THEMES dict at the top of the file, then set config.EMOJI to match.

  4. 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.
  1. Configure the bot inside config.py file. Most things are optional. You can hardcode the values if you don't want to use environment variables.

  2. Run the bot with python bot.py.

License

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.

About

Discord Cat Bot Source Code

Resources

Stars

128 stars

Watchers

6 watching

Forks

Contributors

Languages