Skip to content
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

[V3 Filter] implement exempting other users/roles from the filter #2064

Conversation

palmtree5
Copy link
Member

@palmtree5 palmtree5 commented Aug 29, 2018

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

Adds user/role exemptions for the filter. Will also be extending with channel-specific filters

@palmtree5 palmtree5 added this to the Beta 21 milestone Aug 29, 2018
@palmtree5 palmtree5 added Type: Enhancement Something meant to enhance existing Red features. and removed Type: Fix labels Aug 29, 2018
@palmtree5 palmtree5 removed this from the Beta 21 milestone Aug 29, 2018
word_list = await self.settings.guild(server).filter()
word_list = set(
await self.settings.guild(server).filter()
+ self.settings.channel(message.channel).filter()
Copy link
Member

Choose a reason for hiding this comment

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

self.settings.channel(message.channel).filter() needs to be awaited.

Copy link
Member

@Redjumpman Redjumpman left a comment

Choose a reason for hiding this comment

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

Aside from the co-routine needing to be awaited on line 363, I only have a few things.

When exempting a user or a role, you can simply type in the role name, but a user must be mentioned. It won't throw an error message in discord, but it will raise a BadUnionArgument in the console.

Finally, there isn't a way to remove the exempted users or roles.

Not sure if this would exceed the scope of the PR, but it would be nice if there was a way to view what roles/users have been exempted as well.

@Tobotimus Tobotimus removed this from the Beta 21 milestone Sep 9, 2018
@Redjumpman Redjumpman added QA: Changes Requested Used by few QA members. Awaiting changes requested by maintainers or QA. and removed QA: Needed labels Sep 9, 2018
@mikeshardmind
Copy link
Contributor

Sorry to tack something else onto the above from RJM...

After the discussion in the discord about adding a more global setting (instead of each cog including 3rd party needing these settings where applicable), #2129 once merged will add such a setting, It also includes adding logic to filter to handle interaction based on the current filter code, but this does somewhat obsolete (some of) this. I did add in filter immunity based on them in that PR, but am not sure how this interacts with the other planned changes your description alludes to.

@palmtree5
Copy link
Member Author

I've actually gone ahead and dropped the exemptions stuff in favor of the automated mod action immunity settings introduced in #2129

@palmtree5 palmtree5 dismissed Redjumpman’s stale review September 25, 2018 08:47

Dropped exemptions in favor of the setting added

@palmtree5 palmtree5 added QA: Needed and removed QA: Changes Requested Used by few QA members. Awaiting changes requested by maintainers or QA. labels Sep 25, 2018
@Tobotimus Tobotimus added this to the RC 2 milestone Oct 1, 2018
@Tobotimus Tobotimus modified the milestones: RC 2, RC 1 Oct 1, 2018
Copy link
Member

@Redjumpman Redjumpman left a comment

Choose a reason for hiding this comment

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

This is good to go now. We can always extend this little by little in the future. No need to have on huge PR to add all the different things.

@Redjumpman Redjumpman added QA: Passed Used by few QA members. Has been approved by the assigned QA member(s). and removed QA: Needed labels Oct 2, 2018
@Tobotimus Tobotimus merged commit 93a0e45 into Cog-Creators:V3/develop Oct 2, 2018
@Tobotimus Tobotimus mentioned this pull request Oct 2, 2018
3 tasks
@palmtree5 palmtree5 deleted the V3/enhancement/filter_improvements branch May 31, 2021 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA: Passed Used by few QA members. Has been approved by the assigned QA member(s). Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants