Skip to content

Feat: Implement Cogs, Moderation, Leveling, and Search Features #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

spencerfrost
Copy link
Contributor

**Feat: Implement Cogs, Moderation, Leveling, and Search Features

Description:

This Pull Request introduces a significant refactor and feature expansion for the public Discord bot.

Key Changes:

  1. Refactoring into Cogs:

    • The bot's functionality has been modularized into Discord.py Cogs for better organization and maintainability.
    • New cogs added: general, events, developer, moderation, leveling, search.
    • The main bot.py file now primarily handles cog loading, basic setup, and event listeners managed by the setup_hook.
  2. New Features:

    • Moderation (cogs/moderation.py): Added a comprehensive set of moderation commands and tools (details not fully visible in diff, but the file is substantial).
    • Leveling System (cogs/leveling.py, leveling.db): Implemented a user leveling system, including the necessary database file.
    • Developer Commands (cogs/developer.py): Added developer-specific commands, likely including configuration management (testingurl.json) and role/server checks.
    • Search Functionality (cogs/search.py, functions/):
      • Moved /addon and /schematic search commands into their own cog.
      • Relocated the core search logic (addonsearch.py, schematicsearch.py) into a dedicated functions/ directory.
  3. Enhanced Event Handling (cogs/events.py):

    • Created a dedicated cog for handling events like on_message.
    • Includes logic to suggest migrating from old prefix commands (!!) to new slash commands (/).
  4. Configuration:

    • Added new JSON configuration files: config/replyingconfig.json and config/testingurl.json.
  5. Code Cleanup & Improvements:

    • Updated .gitignore to exclude common Python artifacts (.venv, __pycache__).
    • Refined the bot startup process and error handling in bot.py.
    • Moved general user commands (/help, /ping, /wiki, /github, /socials, /issue8ball, /members, /link, etc.) into the general cog.

Motivation:

  • To improve the codebase structure and make it easier to manage and extend.
  • To add highly requested features like moderation and user leveling.
  • To centralize search logic and standard command handling.

This PR significantly enhances the bot's capabilities and organization.

- Implemented ModerationCog with commands for managing auto-replies, syncing commands, and notifying testers.
- Added SearchCog for addon and schematic search commands utilizing Meilisearch.
- Created configuration files for auto-reply settings and testing URLs.
- Developed functions for addon and schematic searches, including embed generation for Discord messages.
- Initialized a new SQLite database for leveling system.
Copy link

api-blueprint-appwrite bot commented Apr 11, 2025

Development 67ad0767000d58bb6592

Function ID Status Action
Your function has been successfully deployed.

Project name: Development
Project ID: 67ad0767000d58bb6592

Function ID Status Action
Get Env 67d0a51d0017c39b6e30 ready Ready View Logs
Your function has been successfully deployed.

Project name: Development
Project ID: 67ad0767000d58bb6592

Function ID Status Action
Sync blog to meilisearch 67c5aafe00020411083f ready Ready View Logs
Your function has been successfully deployed.

Project name: Development
Project ID: 67ad0767000d58bb6592

Function ID Status Action
Sync Schematics Tags with meilisearch 67bf8f1d00102814bcd4 ready Ready View Logs
Your function has been successfully deployed.

Project name: Development
Project ID: 67ad0767000d58bb6592

Function ID Status Action
Get all user data 67bf7b35002f188635ac ready Ready View Logs

Only deployments on the production branch are activated automatically. If you'd like to activate this deployment, navigate to your deployments. Learn more about Appwrite Function deployments.

💡 Did you know?
Cursor pagination performs better than offset pagination when loading further pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant