mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
new mention behavior, new filter behavior (#3553)
* new mention behavior, new filter behavior * and here too, ffs * docs and reformat * review handling
This commit is contained in:
@@ -943,6 +943,7 @@ class RedBase(
|
||||
async def send_filtered(
|
||||
destination: discord.abc.Messageable,
|
||||
filter_mass_mentions=True,
|
||||
filter_roles=True,
|
||||
filter_invite_links=True,
|
||||
filter_all_links=False,
|
||||
**kwargs,
|
||||
@@ -969,6 +970,8 @@ class RedBase(
|
||||
content = kwargs.pop("content", None)
|
||||
|
||||
if content:
|
||||
if filter_roles and isinstance(destination, discord.TextChannel):
|
||||
content = common_filters.sanitize_role_mentions(content, destination.guild.roles)
|
||||
if filter_mass_mentions:
|
||||
content = common_filters.filter_mass_mentions(content)
|
||||
if filter_invite_links:
|
||||
|
||||
Reference in New Issue
Block a user