Skip to content

Add pre-defined check has_power_level - #119

Open
AnayGarodia wants to merge 1 commit into
Code-Society-Lab:mainfrom
AnayGarodia:feat/has-power-level-check
Open

Add pre-defined check has_power_level#119
AnayGarodia wants to merge 1 commit into
Code-Society-Lab:mainfrom
AnayGarodia:feat/has-power-level-check

Conversation

@AnayGarodia

Copy link
Copy Markdown
Contributor

Description

Adds the pre-defined check has_power_level(level) to matrix/checks.py, following the same decorator pattern as is_admin/is_moderator. The check compares the sender's power level in the room against the given level and passes when the sender's level is greater than or equal to it, so commands decorated with it raise CheckError otherwise. Includes unit tests mirroring the existing check tests.

Closes #105

Type of Change

  • Feature
  • Refactor
  • Bug fix
  • Documentation
  • Other: ___

Pre-merge Checklist

  • Run tests: pytest (382 passed)
  • Run type check: mypy
  • Run formatting: black .

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019cFhMyHwVAQ9GieYbi3aUb
Copilot AI review requested due to automatic review settings July 29, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Check: has_power_level

2 participants