Skip to content

refactor: Continue dynamic moderation refactoring timeout arguments #977

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

Draft
wants to merge 60 commits into
base: refactor/moderation
Choose a base branch
from

Conversation

kzndotsh
Copy link
Contributor

Description

This PR advances the refactoring for a dynamic moderation system by completing the command-level configuration for various moderation commands.

Summary of Changes:

  • Enhanced Command Configurations: Explicitly added supports_reason=True and supports_silent=True flags to the ModerationCommandConfig entries for warn, jail, unjail, unban, untimeout, snippetban, snippetunban, pollban, and pollunban commands in tux/cogs/moderation/command_config.py.
  • Development Environment Update: Changed python.languageServer to None in .vscode/settings.json.

Motivation and Context:
This change is a critical step in building a truly dynamic and DRY (Don't Repeat Yourself) moderation command system. By formalizing these flags within the ModerationCommandConfig dataclass, we ensure that all moderation commands have a consistent and explicit definition of their capabilities regarding reasons and silent execution. This completed configuration is foundational for the next phases, which involve automatically generating commands and unifying argument parsing, ultimately leading to significant code reduction, consistent user experience, and easier maintenance.

Guidelines

  • My code follows the style guidelines of this project (formatted with Ruff)

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation if needed

  • My changes generate no new warnings

  • I have tested this change

  • Any dependent changes have been merged and published in downstream modules

  • I have added all appropriate labels to this PR

  • I have followed all of these guidelines.

How Has This Been Tested? (if applicable)

The existing test suite was executed, and all tests passed successfully.

Screenshots (if applicable)

N/A

Additional Information

This PR solidifies the command configuration layer, which is essential for the subsequent implementation of a unified command runner and automatic command registration, as outlined in the overall refactoring plan.


Open in WebOpen in CursorOpen Docs

Copy link

cloudflare-workers-and-pages bot commented Jul 26, 2025

Deploying tux with  Cloudflare Pages  Cloudflare Pages

Latest commit: 94f3bfc
Status: ✅  Deploy successful!
Preview URL: https://303eb3f0.tux-afh.pages.dev
Branch Preview URL: https://cursor-continue-dynamic-mode.tux-afh.pages.dev

View logs

cursoragent and others added 26 commits July 26, 2025 03:13
cursoragent and others added 29 commits July 26, 2025 05:05
@electron271 electron271 changed the title Continue dynamic moderation refactoring timeout arguments refactor: Continue dynamic moderation refactoring timeout arguments Jul 26, 2025
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.

2 participants