Conversation
dc4d058 to
b2bf526
Compare
b2bf526 to
3c72b27
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds an alert mechanism so whenever a non-staff member uses the !rule command, a message is sent to a dedicated rules-alerts thread in the Moderator+ channel.
- Introduces a new
rule_alertsconstant for the thread ID - Implements
_send_rules_alertininformation.pyand integrates it into therulescommand - Updates tests to mock channel fetching for the new alert behavior
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/bot/exts/info/test_information.py | Patches get_channel to simulate the rules-alerts thread in tests |
| bot/exts/info/information.py | Adds get_or_fetch_channel import, new _send_rules_alert method, and alert trigger in rules command |
| bot/constants.py | Defines rule_alerts channel/thread ID |
Comments suppressed due to low confidence (1)
bot/exts/info/information.py:692
- There is no existing test to verify that non-staff users trigger the rules alert. Consider adding a test case to ensure
_send_rules_alertis invoked and the alert embed is sent as expected.
if constants.Roles.helpers not in {role.id for role in ctx.author.roles}:
MarkKoz
approved these changes
Jun 23, 2025
Contributor
|
LGTM 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an alert within a Moderator+ channel whenever a non-staff member (user without the Helpers role) uses the
!rulecommand.Feature implemented as discussed in
#mod-metawith Moderators.