CDC Bot is a Python application built on discord.py. Running it yourself requires Python, the required packages, and a Discord bot token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cdc-bot/main/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- Python 3.10 or later
- A Discord bot application with a valid bot token
- The bot application must have the following intents enabled in the Discord Developer Portal: Server Members Intent, Message Content Intent, and all other intents (the bot uses
discord.Intents.all())
Installation
Set the bot token
CDC Bot reads its Discord token from the Replace
CDC_TOKEN environment variable:your-bot-token-here with the token from the Discord Developer Portal.Environment variables
| Variable | Required | Description |
|---|---|---|
CDC_TOKEN | Yes | Discord bot token. Obtain from the Discord Developer Portal. |
CDC_DEBUG | No | Set to 1 to enable debug logging and restrict slash command registration to a test guild. |
Data files
CDC Bot writes data to JSON files in the same directory it runs from:| File | Contents |
|---|---|
currency.json | All user balances, inventories, and job assignments |
marriages.json | All active marriages and cheating records |
preferences.json | Per-user preference settings |
server-preferences.json | Per-server configuration settings |
Back up these JSON files regularly to avoid data loss if the host machine has issues.
Syncing slash commands
By default, CDC Bot does not callbot.tree.sync() on startup (it is commented out). A bot owner can trigger a sync using the /dev sync command while the bot is running. This registers all slash commands with Discord globally.
Keeping the bot running
For production use, run CDC Bot under a process manager to restart it if it crashes:systemd service example