AeThex-Bot-Master/replit.md
sirpiglr 4a39363dfd Implement a new achievement system for tracking user progress and rewards
Adds a comprehensive achievement system to the bot, including new triggers for various user actions, the ability to create, manage, and view achievements, and integration with existing XP and leveling systems. This also involves updating user statistics tracking to support achievement triggers.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 28bc7e36-c36d-4b62-b518-bcc2c649398e
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/yTaZipL
Replit-Helium-Checkpoint-Created: true
2025-12-08 21:47:11 +00:00

3.8 KiB

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:

  • 40 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.
  • Achievement System: Custom server achievements with various triggers (level, prestige, XP, messages, reactions, voice time, daily streak, commands used), XP rewards, role rewards, and hidden achievements.

External Dependencies

  • Database: Supabase (used for server_config, warnings, mod_actions, level_roles, role_panels, giveaways, scheduled_messages, automod_config, user_profiles, achievements, user_achievements, and user_stats 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.