TitanBot

codebymitchMIT活跃维护

一站式 Discord 机器人,把社区管理、自动化操作和日常助手功能打包在一起,适合各类服务器直接部署使用。

A powerful, all-in-one Discord assistant built for every server.

v3.0.0发布于 2026-07-13 06:38 UTC9,487star +48 / 7 天15,069fork同步于 2026-11-10 05:30 UTC

怎么上手

从 README 代码块原样提取,可能是其中一种安装方式
git clone https://github.com/codebymitch/TitanBot.git
docker compose up -d --build
docker compose ps
curl http://localhost:3000/health
硬件要求按 README 关键词推断
有 Docker 镜像
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

最近发版

5 个版本v3.0.0
  1. v3.0.0最新正式版2026-07-13 · 2026-07-13 06:38 UTC

    This release is a major stability and architecture update: a full codebase restructure, Lavalink music playback, stronger dashboard and ticket systems, database key migration, and several command and logging fixes.

    What's New

    Music Playback

    • Lavalink v4 integration via Riffy for Spotify, YouTube, Deezer, Apple Music, and more
    • New commands:
      • /play
      • /join
      • /queue
      • /nowplaying
      • /music with playback controls (pause, resume, skip, shuffle, loop, volume, seek, 24/7 mode)
    • Interactive music player buttons for queue and playback management
    • Prefix shortcuts for common music actions (join, np, leave, pause, resume, skip, stop, volume, music)
    • Configurable Lavalink nodes via lavalink/nodes.json, LAVALINK_NODES, or single-node environment variables
    • Optional self-hosted Lavalink using Docker Compose (--profile local-lavalink)

    Project Restructure

    • Major internal reorganization into feature-based folders
    • Database utilities split into dedicated modules:
    • Logging helpers moved to utils/logging/
    • Ticket utilities moved to utils/ticket/
    • Leveling and moderation services separated into dedicated modules

    Stability & Dashboard Improvements

    • Panel health monitoring with automatic startup reconciliation
    • Shared dashboard session helper for improved multi-step interactions
    • Improved ticket dashboard with panel status guards and repost workflow
    • Enhanced verification and reaction-role dashboards
    • Automatic level role synchronization on startup
    • Improved greet dashboard reliability and welcome embed validation

    Moderation

    • New /say command for moderators
    • Prefix permission enforcement aligned with configured moderator roles
    • Configuration Wizard modRole now controls moderation command access
    • Improved moderation hierarchy validation
    • Clearer error messages for users

    Database & Migration

    • Canonical guild-scoped database key format
    • Automatic startup key migration
    • New migration scripts:
      • npm run migrate:keys
      • npm run migrate:keys:dry
    • PostgreSQL schema versioning
    • Improved database wrapper
    • Better fallback handling between PostgreSQL and in-memory storage

    Developer Experience

    • Added CONTRIBUTING.md
    • Updated Docker setup with Lavalink support
    • Improved .env.example
    • Dependency updates and vulnerability fixes

    Breaking Changes

    • Search commands consolidated under /search
      • /define → /search define
      • /google → /search google
      • /urban → /search urban
    • Internal service paths changed after the project restructure
    • Legacy flat service files removed or relocated
    • Database keys migrated to the new guild-scoped format

    Bug Fixes

    • Fixed stale guildConfig import paths
    • Fixed logEmbeds moderation import path
    • Fixed ticket close permission checks
    • Fixed ticket button handler stability
    • Fixed prefix kick member cache resolution
    • Fixed greet dashboard crashes and counter updates
    • Reduced Lavalink reconnect and error log spam
    • General stability, performance, and dashboard interaction improvements

    Full Changelog

    https://github.com/codebymitch/TitanBot/compare/v2.1.0...v3.0.0

  2. v2.0.02026-06-16 · 2026-06-16 10:14 UTC
    查看更新说明

    This release introduces prefix command support, a redesigned configuration wizard, interactive command management, dashboard improvements, and a major logging overhaul.

    What's New

    Prefix Commands

    • Most commands now support both slash and prefix usage (!kick, !ban, !balance, etc.)
    • Command aliases supported (!bal, !lb, !h, and more)
    • Improved usage messages with proper role and channel mentions

    Configuration Wizard (/configwizard)

    • New interactive server configuration dashboard
    • Guided DM setup process for administrators

    Command Management (/commands)

    • Enable or disable individual commands or entire categories
    • Interactive dashboard for managing command access
    • Core commands are protected from accidental disabling

    Logging Overhaul

    • Cleaner, more consistent logging embeds
    • Improved ticket feedback logging
    • Better message edit and delete logs
    • Unified embed styling across logging systems

    Counting Game (/count)

    • New counting game with setup, reset, disable, and leaderboard support
    • Multiple counting channels supported

    Dashboard Improvements

    • New Economy Dashboard for server management
    • Improved Leveling Dashboard with role reward configuration
    • Enhanced Logging Dashboard
    • Better warning management tools
    • Expanded Join-to-Create channel templates

    Breaking Changes

    • Removed commands: /overview, /fact, /mock, /reverse, /ship, /wanted, /movie, /activity
    • Logging embed formatting has been redesigned
    • Several legacy internal services have been removed or consolidated

    Bug Fixes

    • Fixed prefix command response issues
    • Fixed duplicate usage and error messages
    • Fixed welcome and goodbye message handling
    • Fixed dashboard interaction issues
    • General stability and performance improvements

    Full Changelog: https://github.com/codebymitch/TitanBot/compare/v1.1.0...v1.1.1

  3. v1.1.12026-05-02 · 2026-05-02 12:35 UTC
    查看更新说明

    This release introduces Docker support with a published package, alongside a wave of critical bug fixes and quality-of-life improvements across the bot.

    What's New

    Docker Support
    • Official Docker image now available, deploy TitanBot with a single docker run or docker-compose up
    • Docker image is automatically built and published via CI/CD on every release
    • Fixed image push pipeline to ensure the published image is always up to date
    Critical Bug Fixes
    • Applied a series of critical and warning-level fixes across multiple subsystems
    • Fixed errors in the welcome and goodbye message system
    • Made the help command embed title dynamic instead of hardcoded
    • Various stability and correctness fixes across core features

    Docker Hosting Setup Guide

    For setup instructions, see the updated README.

    Full Changelog: https://github.com/codebymitch/TitanBot/compare/v1.1.0...v1.1.1

  4. v1.1.02026-04-15 · 2026-04-15 11:19 UTC
    查看更新说明

    This release introduces a complete redesign of the user setup and configuration experience, featuring new dashboard commands and live customization capabilities.

    What's New

    Dashboard Commands
    • New interactive dashboard commands for live bot customization
    • Real-time configuration updates without restarting
    • Streamlined user onboarding experience
    Redesigned Setup Flow
    • Completely refactored user setup and configuration process
    • Improved UX with clearer configuration steps
    • Better organization of configuration options

    Quick Setup

    View the "Touchpoint" Youtube channel (more information can be found in the #README.md

    Installation

    1. Clone the repository
    2. Install dependencies
    3. Add your Discord bot token, client id, guild id to the configuration
    4. Start the bot
    git clone https://github.com/codebymitch/TitanBot.git
    cd TitanBot
    npm install
    npm start
    

    v1.0.0 → v1.1.0 Migration Guide

    1. Backup database npm run backup:db

    2. Update code git pull origin main

    3. Install dependencies npm install

    4. Apply migrations npm run migrate

    5. Start bot npm start

    Railway Hosting Migration Guide

    1. Sync fork with upstream
    • Go to your forked repository on GitHub
    • Click the "Sync fork" button
    • Pull latest changes from main
    1. Railway auto-deploys
    • Railway should automatically redeploy when you sync
    • Wait for deployment to complete (check Railway dashboard)
    1. Reinvite bot to Discord (optional)
    • Remove bot from your server
    • Use your bot's invite link to reinvite
    1. Verify
    • Check Railway logs for startup messages
    • Test a command in Discord

    Full Changelog: https://github.com/codebymitch/TitanBot/compare/v1.0.0...v1.1.0

  5. v1.0.0v1.0.0 – Initial Release2026-03-07 · 2026-03-07 12:32 UTC
    查看更新说明

    This is the first public release of TitanBot, a Discord bot designed to provide useful utilities and moderation features for Discord servers.

    Features

    • Advanced and diverse command structure
    • Advanced Security support
    • Slash command support
    • Advanced Logging system
    • Easy configuration and setup

    Quick Setup

    View the "Touchpoint" Youtube channel (more information can be found in the README.md

    Installation

    1. Clone the repository
    2. Install dependencies
    3. Add your Discord bot token to the configuration
    4. Start the bot
    git clone https://github.com/codebymitch/TitanBot.git
    cd TitanBot
    npm install
    npm start
    

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    TitanBot - Ultimate Discord Bot

    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.

    Support Server Discord.js PostgreSQL

    Table of Contents

    Features Overview

    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

    Music

    • 24/7 Mode - Play music 24/7
    • Interative Button System - Manage music through buttons
    • Supports EVERY platform - Supports spotify, deezer, youtube, apple music

    Quick Setup (Recommended for non-coders)

    Video Tutorial

    For a detailed step-by-step setup guide, watch our comprehensive video tutorial: TitanBot Setup Tutorial

    Docker Deployment (Recommended)

    TitanBot is fully containerized for easy deployment.

    1. Clone the repository:

      git clone https://github.com/codebymitch/TitanBot.git
      cd TitanBot
      
    2. Configure environment variables:

      cp .env.example .env
      

      Set 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).

    3. Build and start the containers:

      docker compose up -d --build
      
    4. Check status:

      docker compose ps
      curl http://localhost:3000/health
      

    This 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

    Music uses Lavalink v4 via Riffy, similar to Musicify.

    1. By default, the bot loads multiple public v4 SSL nodes from lavalink/nodes.json (sourced from lavalink.darrennathanael.com). Edit that file to add or remove nodes.
    2. To self-host Lavalink instead, run docker compose --profile local-lavalink up -d and set single-node env vars in .env:
      LAVALINK_HOST=lavalink
      LAVALINK_PORT=2333
      LAVALINK_PASSWORD=youshallnotpass
      LAVALINK_SECURE=false
      
      Remove or rename lavalink/nodes.json so the bot falls back to those env vars.
    3. Override nodes inline with LAVALINK_NODES (JSON array) or point at another file with LAVALINK_NODES_FILE.
    4. Use /play <song> from a voice channel, or /join to connect without playing. Prefix shortcuts: join, np, leave, pause, resume, skip, stop, volume <0-100>, or music <subcommand>. Use /nowplaying and /queue for status; /music for loop, shuffle, seek, and other controls.

    Using GitHub Container Registry

    The bot is automatically published to GitHub Container Registry on every push to main.

    docker pull ghcr.io/codebymitch/titanbot:main
    

    Manual Installation Steps

    Prerequisites

    • Node.js 20.10.0 or higher
    • PostgreSQL server (recommended) or memory storage fallback
    • Discord bot application with proper intents
    1. Clone the Repository

      git clone https://github.com/codebymitch/TitanBot.git
      cd TitanBot
      
    2. Install Dependencies

      npm install
      
    3. Configure Environment Variables

      cp .env.example .env
      

      Edit .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=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):

      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).

    Multiple servers

    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:

    • Global slash commands may take up to about an hour to propagate on first deploy
    • Each server has isolated data: config, economy, tickets, leveling, dashboards, warnings, etc. (all keys are scoped as guild:{guildId}:...)
    • 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)
    1. 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;"
      
    2. Verify Database Setup

      npm run migrate:check
      
    3. Start the Bot

      npm start
      

    Note 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`.

    Required Bot Intents

    TitanBot requires the following Discord intents:

    • Guilds
    • Guild Messages
    • Message Content
    • Guild Members
    • Guild Message Reactions
    • Guild Voice States
    • Direct Messages
    • Bot
    • Applications.commands

    Required Permissions

    • View Channels
    • Send Messages
    • Embed Links
    • Attach Files
    • Read Message History
    • Manage Messages
    • Manage Channels
    • Manage Roles
    • Kick Members
    • Manage Messages
    • Ban Members
    • Moderate Members
    • Connect

    License

    TitanBot is released under the MIT License. See LICENSE for details.

    Thank You

    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