AeThex-Bot-Master/replit.md
sirpiglr d7b41b5b4f Introduce prestige system for permanent XP bonuses and rewards
Integrates a new prestige system across multiple commands, including daily rewards, profile, rank, reaction XP, voice XP, and message XP. This involves fetching and utilizing `prestige_level` and `total_xp_earned` from `user_profiles`, applying prestige-based XP multipliers, updating embed messages with prestige information, and adding new helper functions like `getPrestigeInfo` and `getPrestigeColor`. A new `/prestige` command is also introduced with subcommands to view prestige status, perform the prestige action, and view rewards.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 0d5b8d92-a33c-43bb-abda-1d75baaf3b97
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/ZjyNKqu
Replit-Helium-Checkpoint-Created: true
2025-12-08 21:21:59 +00:00

44 lines
No EOL
3.6 KiB
Markdown

# AeThex Unified Bot
## Overview
The AeThex Unified Bot is a comprehensive Discord bot designed to integrate community features, enterprise-level security, and multi-purpose server management. It aims to unify various functionalities into a single, powerful instance for the AeThex ecosystem.
Key capabilities include:
- **Community Engagement**: User verification, profile linking, realm selection, leaderboards, community posts, leveling system, role panels, and giveaways.
- **Sentinel Security**: Anti-nuke protection with RAM-based heat tracking to safeguard servers.
- **Federation Sync**: Cross-server role synchronization across multiple realms.
- **Support & Moderation**: A ticket system for support, a full suite of moderation tools (warn, kick, ban, timeout), and auto-moderation for content filtering.
- **Cross-Platform Integration**: Seamless connection with AeThex.studio and AeThex.foundation platforms.
## User Preferences
I prefer iterative development and receiving explanations that focus on the "why" behind changes, not just the "what". Please provide clear, step-by-step instructions for any complex tasks. I also appreciate it when you anticipate potential issues and suggest solutions proactively.
## System Architecture
The bot is built on **Node.js 20** using the **discord.js v14** framework. It follows a modular design with commands and event listeners separated into distinct directories.
**Key Architectural Decisions:**
- **Modular Command and Event Handling**: Commands are organized by function, and events are handled by dedicated listeners, promoting maintainability and scalability.
- **Unified XP System**: A cross-platform leveling system tracks XP from Discord messages, reactions, voice chat, daily claims, and AeThex platform activity. XP is unified across all platforms and stored in a single user profile.
- Leveling formula: `level = floor(sqrt(xp / base))`, with configurable base difficulty.
- **Prestige System**: Users can reset XP at Level 50 for permanent bonuses and rewards, including XP multipliers and unique badges.
- **Sentinel Security Module**: Implements RAM-based heat tracking for anti-nuke protection, monitoring for mass bans, kicks, role deletions, and channel deletions.
- **Federation Sync**: Manages cross-server role synchronization to ensure consistent access and permissions across linked guilds.
- **Interactive UI**: Utilizes Discord's button interactions for features like role panels and modals for custom embed creation.
- **Web Dashboard**: A `dashboard.html` file in the `public/` directory is available for potential web-based interactions or monitoring.
**Feature Specifications:**
- **38 Commands**: Covering community, leveling, moderation, utility, admin, cross-platform, and security functions.
- **Rich Embeds**: Used extensively for welcome/goodbye messages, user profiles, server info, and announcements.
- **Configurable Auto-moderation**: Settings for link, spam, badword, invite, and mention filtering with adjustable actions.
- **Scheduled Messages**: Allows scheduling timed announcements with support for embeds.
- **Giveaway System**: Automated creation, management, and rerolling of giveaways.
## External Dependencies
- **Database**: Supabase (used for `server_config`, `warnings`, `mod_actions`, `level_roles`, `role_panels`, `giveaways`, `scheduled_messages`, `automod_config`, and `user_profiles` tables).
- **Discord API**: `discord.js v14` for interacting with the Discord platform.
- **AeThex.studio**: Integration for viewing user profiles.
- **AeThex.foundation**: Integration for viewing user contributions.