Advanced Discord Ticket Bot v2.0 là một hệ thống quản lý ticket Discord chuyên nghiệp với đầy đủ tính năng enterprise-grade. Được thiết kế dành cho các server cần hỗ trợ khách hàng chuyên nghiệp và quản lý yêu cầu hiệu quả.
- ✅ Hoàn toàn loại bỏ web dashboard - Tối ưu hiệu năng 100%
- ✅ Enterprise-grade features - Tính năng cấp doanh nghiệp
- ✅ Advanced analytics - Phân tích chi tiết và báo cáo
- ✅ Smart automation - Tự động hóa thông minh
- ✅ Performance monitoring - Theo dõi hiệu năng realtime
- 📝 Tạo ticket với chủ đề và priority tùy chỉnh
- 🏷️ Hệ thống đánh số ticket tự động (TK-0001, TK-0002...)
- 👥 Claim và assign ticket cho staff
- 🔄 Đóng, mở lại, và transfer ticket
- 🗑️ Xóa ticket vĩnh viễn với confirmation
- 📋 Danh sách ticket với filter và pagination
- 💬 Theo dõi activity và participants realtime
- 📈 Thống kê server: Total tickets, resolution time, top users
- 👤 Phân tích user: Performance metrics, ticket history
- 📉 Trend analysis: 7-day activity, category breakdown
- 📊 SLA tracking: Response time, breach detection
- 📤 Export data: CSV, JSON, Excel formats
- 🎯 Performance insights: Staff efficiency, workload balance
- 🔧 Bulk operations: Mass close, cleanup, transfer
- 🕒 Auto-close management: Smart timeout với warnings
- 📋 Advanced filtering: Status, user, date range
- 💾 Database maintenance: Cleanup old tickets, optimization
- 📤 Mass export: Flexible data export options
- ⚙️ Configuration management: Per-guild settings
- ⏰ Smart auto-close: Inactivity detection với multiple warnings
- 📄 Auto-transcript: Tự động tạo transcript với attachments
- 🔔 Notification system: DM alerts, role mentions
- 📊 Weekly digests: Automated reports cho administrators
- 🎯 Priority escalation: Auto-escalate high priority tickets
- 🔄 Status management: Dynamic bot status với realtime stats
- 🌟 Interactive help system: Button-based navigation
- 🎛️ Settings management: GUI configuration panels
- 📱 Responsive embeds: Beautiful, informative displays
- 🎯 Smart buttons: Context-aware action buttons
- 🏷️ Category management: Organized ticket categories
- 🎨 Custom branding: Configurable colors và messages
- Node.js: v18.0.0 trở lên
- MongoDB: v4.4 trở lên (Atlas hoặc self-hosted)
- Discord Bot: Token và permissions
- RAM: Tối thiểu 512MB
- Storage: 1GB cho logs và transcripts
- Truy cập Discord Developer Portal
- Tạo New Application và đặt tên bot
- Vào tab Bot và tạo bot token
- Lưu ý: Copy token ngay, chỉ hiển thị 1 lần!
- Bật các Privileged Gateway Intents:
- ✅ Server Members Intent
- ✅ Message Content Intent
Option A: MongoDB Atlas (Recommended)
- Tạo account tại MongoDB Atlas
- Tạo free cluster
- Setup database user và whitelist IP
- Copy connection string
Option B: Local MongoDB
# Ubuntu/Debian sudo apt install mongodb # Windows: Download from mongodb.com # macOS: brew install mongodb-community# Clone repository git clone https://github.com/Hoocs151/discord-ticket-bot.git cd discord-ticket-bot # Cài đặt dependencies npm install # Copy và chỉnh sửa environment file cp .env.example .envChỉnh sửa file .env:
# Discord Bot Configuration DISCORD_TOKEN=your_bot_token_here DISCORD_CLIENT_ID=your_bot_client_id_here DISCORD_CLIENT_SECRET=your_bot_client_secret_here # MongoDB Configuration MONGODB_URI=your_mongodb_connection_string # Bot Configuration NODE_ENV=production MAX_TICKETS_PER_USER=5 TICKET_CLOSE_TIMEOUT=24 TRANSCRIPT_ENABLED=true# Chạy development mode npm run dev # Chạy production mode npm start # Deploy slash commands npm run deploy-commands # Chạy tests npm test- Vào Discord Developer Portal → OAuth2 → URL Generator
- Chọn scopes:
botvàapplications.commands - Chọn permissions:
- ✅ Manage Channels
- ✅ Manage Roles
- ✅ View Channels
- ✅ Send Messages
- ✅ Manage Messages
- ✅ Embed Links
- ✅ Attach Files
- ✅ Read Message History
- ✅ Use Slash Commands
- Invite bot vào server với đầy đủ permissions
- Chạy
/settings category createđể tạo category tickets - Setup support roles với
/settings automation - Cấu hình auto-close với
/ticket-admin auto-close
| Lệnh | Mô Tả | Cách Sử Dụng |
|---|---|---|
/ticket create | Tạo ticket mới | /ticket create subject:Cần hỗ trợ payment |
/ticket close | Đóng ticket hiện tại | /ticket close reason:Đã giải quyết |
/ticket reopen | Mở lại ticket đã đóng | /ticket reopen |
/ticket claim | Claim ticket (staff only) | /ticket claim |
/ticket list | Danh sách ticket của bạn | /ticket list status:open |
/ticket info | Thông tin ticket hiện tại | /ticket info |
| Lệnh | Mô Tả | Cách Sử Dụng |
|---|---|---|
/stats server | Thống kê toàn server | /stats server |
/stats user | Thống kê người dùng | /stats user user:@username |
/analytics overview | Báo cáo tổng quan | /analytics overview |
/analytics performance | Phân tích hiệu suất | /analytics performance |
/analytics trends | Xu hướng và pattern | /analytics trends |
/analytics export | Xuất dữ liệu | /analytics export format:csv |
| Lệnh | Mô Tả | Quyền Yêu Cầu |
|---|---|---|
/ticket-admin list | Liệt kê tất cả tickets | Administrator |
/ticket-admin force-close | Force close ticket | Manage Channels |
/ticket-admin cleanup | Dọn dẹp tickets cũ | Administrator |
/ticket-admin export | Xuất dữ liệu hàng loạt | Administrator |
/ticket-admin transfer | Chuyển ownership | Manage Channels |
/ticket-admin auto-close | Cấu hình auto-close | Administrator |
| Lệnh | Mô Tả | Cách Sử Dụng |
|---|---|---|
/settings category | Quản lý categories | /settings category create name:Support |
/settings automation | Cấu hình tự động | /settings automation auto-assignment |
/settings notifications | Setup thông báo | /settings notifications dm-notifications |
| Lệnh | Mô Tả | Quyền Yêu Cầu |
|---|---|---|
/status-admin performance | Xem metrics bot | Administrator |
/status-admin refresh | Force refresh stats | Administrator |
/status-admin custom | Set custom status | Administrator |
/status-admin maintenance | Toggle maintenance mode | Administrator |
| Lệnh | Mô Tả |
|---|---|
/help | Menu trợ giúp tương tác |
/help setup | Hướng dẫn setup |
/help features | Danh sách tính năng |
Workflow: 1. Detect inactivity (default: 24 hours) 2. Send warning message (2 hours before) 3. Final warning (30 minutes before) 4. Auto-close với transcript 5. Move to closed category 6. Send summary to staffCấu hình:
/ticket-admin auto-close enabled:true hours:48Tính năng:
- 📝 Complete message history
- 📎 All attachments preserved
- 👥 Participant tracking
- 🕐 Timestamp accuracy
- 📊 Activity metrics
- 🔍 Searchable content
Bot hiển thị status động với thông tin realtime:
- 🎫
/help | v2.0 Advanced Ticket System - 👀
12 active tickets | /ticket create - 📊
1.2K total tickets processed - ✅
15 tickets closed today - 🚀
enterprise-grade support system
Metrics theo dõi:
- ⚡ Response time trung bình
- 🔄 Status update frequency
- ❌ Error rate và recovery
- 💾 Cache hit ratio
- 🎯 Database query performance
Q: Bot không phản hồi slash commands?
A: Kiểm tra: 1. Bot có permissions Use Slash Commands 2. Commands đã được deploy: npm run deploy-commands 3. Bot đang online và kết nối database 4. Kiểm tra logs: npm run logs Q: Không thể tạo ticket?
A: Có thể do: 1. Đã đạt giới hạn MAX_TICKETS_PER_USER 2. Category chưa được setup 3. Bot thiếu permission Manage Channels 4. Database connection issue Q: Auto-close không hoạt động?
A: Kiểm tra: 1. Cấu hình: /ticket-admin auto-close 2. TICKET_CLOSE_TIMEOUT trong .env 3. Bot process đang chạy liên tục 4. Database có thể ghi được Advanced Discord Ticket Bot v2.0 is a professional Discord ticket management system with enterprise-grade features. Designed for servers requiring professional customer support and efficient request management.
- ✅ Complete web dashboard removal - 100% performance optimization
- ✅ Enterprise-grade features - Business-level functionality
- ✅ Advanced analytics - Detailed analysis and reporting
- ✅ Smart automation - Intelligent automation systems
- ✅ Performance monitoring - Real-time performance tracking
- 📝 Create tickets with custom subjects and priorities
- 🏷️ Automatic ticket numbering system (TK-0001, TK-0002...)
- 👥 Claim and assign tickets to staff
- 🔄 Close, reopen, and transfer tickets
- 🗑️ Permanent ticket deletion with confirmation
- 📋 Ticket listing with filters and pagination
- 💬 Real-time activity and participant tracking
- 📈 Server statistics: Total tickets, resolution time, top users
- 👤 User analysis: Performance metrics, ticket history
- 📉 Trend analysis: 7-day activity, category breakdown
- 📊 SLA tracking: Response time, breach detection
- 📤 Data export: CSV, JSON, Excel formats
- 🎯 Performance insights: Staff efficiency, workload balance
- 🔧 Bulk operations: Mass close, cleanup, transfer
- 🕒 Auto-close management: Smart timeout with warnings
- 📋 Advanced filtering: Status, user, date range
- 💾 Database maintenance: Cleanup old tickets, optimization
- 📤 Mass export: Flexible data export options
- ⚙️ Configuration management: Per-guild settings
- ⏰ Smart auto-close: Inactivity detection with multiple warnings
- 📄 Auto-transcript: Automatic transcript generation with attachments
- 🔔 Notification system: DM alerts, role mentions
- 📊 Weekly digests: Automated reports for administrators
- 🎯 Priority escalation: Auto-escalate high priority tickets
- 🔄 Status management: Dynamic bot status with real-time stats
- Node.js: v18.0.0 or higher
- MongoDB: v4.4 or higher (Atlas or self-hosted)
- Discord Bot: Token and permissions
- RAM: Minimum 512MB
- Storage: 1GB for logs and transcripts
- Visit Discord Developer Portal
- Create New Application and name your bot
- Go to Bot tab and create bot token
- Important: Copy token immediately, only shown once!
- Enable Privileged Gateway Intents:
- ✅ Server Members Intent
- ✅ Message Content Intent
Option A: MongoDB Atlas (Recommended)
- Create account at MongoDB Atlas
- Create free cluster
- Setup database user and whitelist IP
- Copy connection string
Option B: Local MongoDB
# Ubuntu/Debian sudo apt install mongodb # Windows: Download from mongodb.com # macOS: brew install mongodb-community# Clone repository git clone https://github.com/Hoocs151/discord-ticket-bot.git cd discord-ticket-bot # Install dependencies npm install # Copy and edit environment file cp .env.example .envEdit .env file:
# Discord Bot Configuration DISCORD_TOKEN=your_bot_token_here DISCORD_CLIENT_ID=your_bot_client_id_here DISCORD_CLIENT_SECRET=your_bot_client_secret_here # MongoDB Configuration MONGODB_URI=your_mongodb_connection_string # Bot Configuration NODE_ENV=production MAX_TICKETS_PER_USER=5 TICKET_CLOSE_TIMEOUT=24 TRANSCRIPT_ENABLED=true# Run development mode npm run dev # Run production mode npm start # Deploy slash commands npm run deploy-commands # Run tests npm test- Invite bot to server with full permissions
- Run
/settings category createto create ticket categories - Setup support roles with
/settings automation - Configure auto-close with
/ticket-admin auto-close
| Command | Description | Usage |
|---|---|---|
/ticket create | Create new ticket | /ticket create subject:Need payment support |
/ticket close | Close current ticket | /ticket close reason:Issue resolved |
/ticket reopen | Reopen closed ticket | /ticket reopen |
/ticket claim | Claim ticket (staff only) | /ticket claim |
/ticket list | List your tickets | /ticket list status:open |
/ticket info | Current ticket info | /ticket info |
| Command | Description | Usage |
|---|---|---|
/stats server | Server statistics | /stats server |
/stats user | User statistics | /stats user user:@username |
/analytics overview | Overview report | /analytics overview |
/analytics performance | Performance analysis | /analytics performance |
/analytics trends | Trends and patterns | /analytics trends |
/analytics export | Export data | /analytics export format:csv |
| Command | Description | Required Permission |
|---|---|---|
/ticket-admin list | List all tickets | Administrator |
/ticket-admin force-close | Force close ticket | Manage Channels |
/ticket-admin cleanup | Cleanup old tickets | Administrator |
/ticket-admin export | Bulk data export | Administrator |
/ticket-admin transfer | Transfer ownership | Manage Channels |
/ticket-admin auto-close | Configure auto-close | Administrator |
- ✅ Complete web dashboard removal
- ✅ Comprehensive help system
- ✅ Advanced statistics & analytics
- ✅ Auto-close system with warnings
- ✅ Advanced admin tools
- ✅ Enhanced transcript system
- ✅ Message activity tracking
- ✅ Export functionality
- ✅ Ticket transfer system
- ✅ Improved error handling
- ✅ Performance optimization & caching
- ✅ Status management system
- ✅ Settings management GUI
- ✅ Validation & security enhancements
MIT License - Free to use and modify.
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
If this bot helps your server, please:
- ⭐ Star the repository
- 🐛 Report issues
- 💡 Suggest features
- 🤝 Contribute code
- 📢 Share with others