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:
Michael H
2020-02-14 09:07:16 -05:00
committed by GitHub
parent a44047bfe3
commit 066bf516d9
3 changed files with 44 additions and 1 deletions

View File

@@ -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: