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 :smile:
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 :smile:
I'm planning on allowing for exempting specific roles and users from a filter
Seems to me this is resolved by #2064 and #2129.
Most helpful comment
I'm planning on allowing for exempting specific roles and users from a filter