TitanBot is a powerful, feature-rich Discord bot designed to enhance your server experience with comprehensive moderation tools, engaging economy systems, utility features, and much more. Built with modern Discord.js v14 and PostgreSQL for optimal performance and data persistence.
TitanBot offers a complete suite of tools for Discord server management and community engagement:
| ### Moderation & Administration - **Mass Actions** - Bulk ban/kick capabilities - **User Notes** - Keep detailed moderation records - **Case Management** - View and track all mod actions ### Economy System - **Shop & Inventory** - Buy and manage items - **Gambling** - Risk it for rewards - **Pay System** - Transfer money between users ### Fun & Entertainment - **Random Facts** - Learn something new - **Wanted Poster** - Create fun wanted images - **Text Reversal** - Reverse any text ### Advanced Ticket System - **Claim & Priority** - Staff ticket management - **Ticket Limits** - Prevent spam - **Transcript System** - Save ticket history ### Server Stats - **Member Counter** - Live member count channels - **Voice Counters** - Track voice stats - **Dynamic Updates** - Real-time channel updates ### Reaction Roles - **Role Assignment** - Self-assignable roles - **Emoji Selection** - Reaction-based system - **Multi-role Support** - Multiple role options | ### Leveling & XP System - **XP Tracking** - Automatic message-based XP - **Level Roles** - Auto-assign roles by level - **Custom Configuration** - Personalize leveling ### Giveaways & Events - **Multiple Winners** - Support multi-winner giveaways - **Auto Picking** - Automatic winner selection - **Reroll System** - Pick new winners if needed ### Birthday System - **Birthday Tracking** - Never miss a birthday - **Auto Announcements** - Celebrate automatically - **Timezone Support** - Accurate worldwide tracking ### Utility Tools - **Report System** - Report issues to staff - **Todo Lists** - Personal task management - **First Message** - Jump to channel's first message ### Welcome System - **Welcome Messages** - Greet new members - **Auto Roles** - Assign roles on join - **Custom Embeds** - Personalized messages |
For a detailed step-by-step setup guide, watch our comprehensive video tutorial: TitanBot Setup Tutorial
TitanBot is fully containerized for easy deployment.
Clone the repository:
bash
git clone https://github.com/codebymitch/TitanBot.git
cd TitanBot
Configure environment variables:
Create a .env file from .env.example and fill in your bot details and PostgreSQL credentials.
Start the containers:
bash
docker-compose up -d
This will start both the bot and a persistent PostgreSQL database.
The bot is automatically published to GitHub Container Registry on every push to main.
docker pull ghcr.io/codebymitch/titanbot:main
Discord bot application with proper intents
Clone the Repository
bash
git clone https://github.com/codebymitch/TitanBot.git
cd TitanBot
Install Dependencies
bash
npm install
Configure Environment Variables
bash
cp .env.example .env
Edit .env with your configuration (only the following variables require configuration, leave remaining variables as default):
```env
# Discord Bot Configuration
DISCORD_TOKEN=your_discord_bot_token_here
CLIENT_ID=your_discord_client_id_here
GUILD_ID=your_discord_guild_id_here
# PostgreSQL Configuration (Primary Database) POSTGRES_URL=postgresql://postgres:yourpassword@localhost:5432/titanbot POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_DB=titanbot POSTGRES_USER=postgres POSTGRES_PASSWORD=yourpassword ```
Production note:
- NODE_ENV=production
- LOG_LEVEL=warn for a clean production console (critical issues + startup status)
- LOG_LEVEL=info if you want more detailed operational logs
- If your chosen PORT is already used, TitanBot automatically tries the next port(s)
Environment options reference:
- NODE_ENV: development, production, test (any non-production value is treated as non-production)
- LOG_LEVEL: error, warn, info, http, verbose, debug, silly
- Accepted aliases for LOG_LEVEL in this bot: warns, warning, warnings → warn
Recommended production .env (easy mode + default mode):
env
NODE_ENV=production
LOG_LEVEL=warn
WEB_HOST=0.0.0.0
PORT=3000
PORT_RETRY_ATTEMPTS=5
This gives clear startup/online status messages while keeping logs simple for non-technical operators.
If port 3000 is busy, the bot tries the next available ports automatically (up to PORT_RETRY_ATTEMPTS).
Most users run TitanBot on a single server with GUILD_ID set (default tutorial setup). If you want slash commands to work in every server the bot is invited to, opt in with:
MULTI_GUILD=true
Notes for multi-server mode:
- GUILD_ID is not used for command registration when MULTI_GUILD=true (you can leave it set or remove it)
- Global slash commands may take up to about an hour to propagate on first deploy
- Each server still has isolated config, economy, tickets, leveling, and other data
- In the Discord Developer Portal, ensure your bot is not restricted to a single guild if you plan to invite it elsewhere
- Generate an OAuth2 invite URL from the Discord Developer Portal (OAuth2 → URL Generator, scopes: bot and applications.commands)
Setup PostgreSQL Database (Optional but recommended)
bash
# Create database and user
createdb titanbot
createuser titanbot
psql -c "ALTER USER titanbot PASSWORD 'yourpassword';"
psql -c "GRANT ALL PRIVILEGES ON DATABASE titanbot TO titanbot;"
Test Database Connection
bash
npm run test-postgres
TitanBot requires the following Discord intents: - Guilds - Guild Messages - Message Content - Guild Members - Guild Message Reactions - Guild Voice States - Direct Messages - Bot - Applications.commands
We welcome contributions to TitanBot! Here's how you can help:
TitanBot is released under the MIT License. See LICENSE for details.
Thank you for choosing TitanBot for your Discord server! We're constantly working to improve and add new features based on community feedback.
Last updated: May 2026
$ claude mcp add TitanBot \
-- python -m otcore.mcp_server <graph>