Tetobot | Discord Utility & Moderation Bot
Overview
TetoBot (formerly known as ChismeBot) is a comprehensive Discord bot designed to streamline server management and enhance user experience. It combines powerful moderation tools with utility features, all while maintaining high performance and reliability. Developed by Sebastián.
Key Features:
- • Keyword Detection System: Multi-word phrase detection with category-based channel filtering, configurable actions (log, delete, DM), and rich embed logging.
- • Ticket Inactivity Monitoring: Automatic tracking of support tickets with inactivity alerts, staff notifications, and auto-closure after configurable timeouts.
- • Reminder System: Create, update, and manage scheduled reminders with persistent storage across restarts.
- • Blacklist Management: User blacklisting with RAM caching for fast lookups and protected user exemptions.
- • Voice Tracking: Monitor voice channel activity and track achievements.
- • AI Integration: OpenAI-powered helper for DM responses.
- • Media Restriction & Sticky Messages: Control media permissions and persist important messages.
- • Event Tracking: Bump notifications, domain safety checks, and URL threat detection.
- • Commands: 47+ commands supporting both slash and prefix formats with hierarchical permission levels.
Built With
- • Runtime: Node.js
- • Discord API: discord.js v14 (slash commands, buttons, modals, pagination)
- • Database: MariaDB with Sequelize v6 ORM (15+ models)
- • Web Server: Express (health monitoring, Uptime Kuma integration)
- • AI: OpenAI API
- • HTTP Client: axios
- • Configuration: dotenv + JSON config files
How It Works
1. Command System:
- Slash commands are registered dynamically with Discord's API and synced globally or per-guild.
- Commands support hierarchical permission levels (0–6), ensuring only authorized users can execute sensitive actions.
- A paginated help system with interactive buttons makes discovery easy.
2. Keyword Detection:
- Incoming messages are scanned against configurable keyword categories.
- Detection uses word boundary matching and is case-insensitive.
- Based on category settings, the bot can log, delete, and/or DM the offending user.
- Staff receive rich embed notifications with jump links for context.
3. Ticket Inactivity Monitoring:
- The bot tracks all ticket channels and resets activity timers on new messages.
- If inactivity exceeds a configured threshold, the bot sends a reminder with "Sí/No" buttons for resolution confirmation.
- Staff are notified via role mentions, and tickets are auto-closed if inactivity persists.
4. Persistence & Caching:
- All critical data (reminders, blacklists, ticket states) is stored in MariaDB.
- Frequently accessed data (e.g., blacklists) is cached in RAM for near-instant lookups.
- The bot gracefully resumes scheduled tasks after restarts (reminders, tickets, etc.).
5. Health Monitoring:
- The bot tracks gateway, internal, database, and OpenAI response times.
- A heartbeat timer reports bot status, and unhandled rejections/errors are caught to ensure stability.
- Uptime Kuma integration allows external monitoring of bot availability.