[V3 Filter] Possible improvements #1873

Closed
opened 2018-06-16 21:06:21 +02:00 by palmtree5 · 10 comments
palmtree5 commented 2018-06-16 21:06:21 +02:00 (Migrated from github.com)

Feature request

Select the type of feature you are requesting:

  • Cog
  • Command
  • API functionality

Describe your requested feature

Some possible improvements to the Filter cog include:

  • Channel-specific filters
  • Regex-based filters

Feel free to comment with more below and I'll look into possibly adding them.

# Feature request <!-- This template is for feature requests. Please fill out the following: --> #### Select the type of feature you are requesting: <!-- To check a box, replace the space between the [] with a x --> - [ ] Cog - [x] Command - [ ] API functionality #### Describe your requested feature Some possible improvements to the Filter cog include: - Channel-specific filters - Regex-based filters Feel free to comment with more below and I'll look into possibly adding them.
mikeshardmind commented 2018-06-16 21:22:31 +02:00 (Migrated from github.com)

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

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
skeith commented 2018-06-17 05:39:59 +02:00 (Migrated from github.com)

If we are going to add channel specific filter, might as well add role based filter too

If we are going to add channel specific filter, might as well add role based filter too
Tobotimus commented 2018-06-17 06:38:01 +02:00 (Migrated from github.com)

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.

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.
skeith commented 2018-06-17 07:02:55 +02:00 (Migrated from github.com)

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

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
Tobotimus commented 2018-06-17 07:51:35 +02:00 (Migrated from github.com)

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 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 :smile:
Tobotimus commented 2018-06-17 07:55:42 +02:00 (Migrated from github.com)

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.

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.
mikeshardmind commented 2018-06-17 08:14:13 +02:00 (Migrated from github.com)

role settings for filter immunity would be neat, but I think extra filters per role might get convoluted

role settings for filter immunity would be neat, but I think extra filters per role might get convoluted
Tobotimus commented 2018-06-17 08:22:57 +02:00 (Migrated from github.com)

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 😄

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 :smile:
palmtree5 commented 2018-06-24 00:55:53 +02:00 (Migrated from github.com)

I'm planning on allowing for exempting specific roles and users from a filter

I'm planning on allowing for exempting specific roles and users from a filter
Tobotimus commented 2018-10-03 00:46:05 +02:00 (Migrated from github.com)

Seems to me this is resolved by #2064 and #2129.

Seems to me this is resolved by #2064 and #2129.
Sign in to join this conversation.
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 milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#1873
No description provided.