| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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:
|
|
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:
git clone https://github.com/codebymitch/TitanBot.git
cd TitanBotConfigure environment variables:
cp .env.example .envSet at minimum DISCORD_TOKEN, CLIENT_ID, and GUILD_ID. Docker Compose also reads POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB from .env (defaults: titanbot / password / titanbot).
Build and start the containers:
docker compose up -d --buildCheck status:
docker compose ps
curl http://localhost:3000/healthThis starts the bot and PostgreSQL. The compose file sets POSTGRES_SSL=false and AUTO_MIGRATE=true for the bundled database. Music uses public Lavalink v4 nodes from lavalink/nodes.json by default.
Music uses Lavalink v4 via Riffy, similar to Musicify.
LAVALINK_HOST=lavalink
LAVALINK_PORT=2333
LAVALINK_PASSWORD=youshallnotpass
LAVALINK_SECURE=falseThe bot is automatically published to GitHub Container Registry on every push to main.
docker pull ghcr.io/codebymitch/titanbot:mainClone the Repository
git clone https://github.com/codebymitch/TitanBot.git
cd TitanBotInstall Dependencies
npm installConfigure Environment Variables
cp .env.example .envEdit .env with your configuration (only the following variables require configuration, leave remaining variables as default):
# 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=yourpasswordProduction note:
Environment options reference:
Recommended production .env (easy mode + default mode):
NODE_ENV=production
LOG_LEVEL=warn
WEB_HOST=0.0.0.0
PORT=3000
PORT_RETRY_ATTEMPTS=5This 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).
Slash commands are registered globally on startup (via CLIENT_ID), so the bot works in every server it is invited to. GUILD_ID stays in the tutorial .env for setup steps but is not used for command registration.
Notes:
Setup PostgreSQL Database (Optional but recommended)
# 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;"Verify Database Setup
npm run migrate:checkStart the Bot
npm startNote on database migrations: Schema tables and legacy key migrations run automatically on startup, somanaged hosts like **Railway** need no manual migration step — just deploy/restart. To disable auto-migration setAUTO_MIGRATE=false. You can still run a manual key migration locally with node scripts/migrate-keys.js --dry-run(preview) ornode scripts/migrate-keys.js`.
TitanBot requires the following Discord intents:
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
| Back | FazBrowse Home | New Git URL |