Skip to content

Modularize cogs, harden database and bot core, add utilities and new features#3

Open
Gamming-SERVICE wants to merge 1 commit intoBETA-TEST-01from
codex/refactor-discord-bot-into-separate-files-juh8fg
Open

Modularize cogs, harden database and bot core, add utilities and new features#3
Gamming-SERVICE wants to merge 1 commit intoBETA-TEST-01from
codex/refactor-discord-bot-into-separate-files-juh8fg

Conversation

@Gamming-SERVICE
Copy link
Copy Markdown
Owner

Motivation

  • Move to a modular, type-hinted cog structure and improve maintainability by splitting features into separate files.
  • Harden database handling and migrations so older DB schemas remain compatible and new features (invite tracking, market) have persistent storage.
  • Improve startup robustness and security by centralizing token resolution and loading cogs dynamically.
  • Provide small utility helpers and update configuration and dependencies for a modern runtime.

Description

  • Added many new cogs (admin, ai, economy, events, fun, giveaway, invite_tracker, leveling, market, moderation updates, music cleanup, tickets, utility, waifu) and removed/merged the old marketplace to market for a more consistent API surface.
  • Rewrote database.py to expose DB_PATH, implement init_database() with schema creation and backward-compatible migrations, and robust get_user_data / update_user_data helpers handling composite PKs.
  • Reworked main.py into IntentBot with _resolve_token() (environment-first token), updated intents, improved setup_hook to load all cogs, and an async main() run loop with clear error handling on login failure.
  • Created utils.py for common helpers (create_embed, parse_time), expanded config.py to read token from environment and clarified settings, and updated requirements.txt with required runtime packages.
  • Improved error handling and timeouts for external AI HTTP calls, added response chunking for long messages, tightened permissions checks, and added type hints across the codebase.

Testing

  • No automated tests were run as part of this change set.

Codex Task

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 16, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: be19f385-0872-4999-afbe-59b15e9e9f0e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/refactor-discord-bot-into-separate-files-juh8fg
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant