[V3 Filter] Possible improvements #1873
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#1873
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Feature request
Select the type of feature you are requesting:
Describe your requested feature
Some possible improvements to the Filter cog include:
Feel free to comment with more below and I'll look into possibly adding them.
Hey, if this is happening, can we also split the logic for if a message should be filtered out to something 3rd party cogs can use too, as well as return the content it matched? This could be incredibly useful to anyone extending base functionality for moderation purposes
If we are going to add channel specific filter, might as well add role based filter too
We have to be mindful that adding features for the filter has a performance hit, as the filter check is run for every message which is sent. I don't think we should add a role-based filter just because we're adding a channel filter, unless there is really a need for one.
well, the role based filter is actually has a use case
sometimes, we only want a specific role can post discord invite links
while I understand I can restrict it with channel permission, but that would make the channel read only for all other users
I also hope that this filter works both way as in blacklisting and whitelisting
I can understand that.
So I suppose the filtered words for a message would resolve to the union of the guild's filter, channel's filter and role filters? I can already sort of see where people might be confused by this and think the channel's filter would completely override the guild's filter... How would the role filter fit in there as well? Does something take precedence? IMO it gets a little complicated for a core feature... But PoC's are always welcome 😄
I think doing something like what @mikeshardmind is suggesting would be better than adding a role-based filter to the core cog, that way cog creators could implement their own filters for their more niche use cases.
role settings for filter immunity would be neat, but I think extra filters per role might get convoluted
That's what I was thinking, perhaps just adding roles as exempt from the filter would be a better solution, albeit slightly less customisable. As of right now we just exempt people with the mod/admin role, the owner, and other bots. And halfway through typing this message @palmtree5 has informed me this will indeed be supported 😄
I'm planning on allowing for exempting specific roles and users from a filter
Seems to me this is resolved by #2064 and #2129.