[ctx] Suppress all mentions in maybe_send_embed (#4192)

* [ctx] Suppress all mentions in maybe_send_embed

Whether this method should mention shouldn't be tied to an unrelated setting.

* black

* Update changelog_3_4_0.rst

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
zephyrkul 2020-08-17 16:20:03 -06:00 committed by GitHub
parent d8e780b228
commit 089c253d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -90,6 +90,7 @@ Breaking changes
- see `discord.AllowedMentions` and ``allowed_mentions`` kwarg of ``.send()`` methods, if your cog requires to mention roles or ``@everyone/@here`` - see `discord.AllowedMentions` and ``allowed_mentions`` kwarg of ``.send()`` methods, if your cog requires to mention roles or ``@everyone/@here``
- `Context.maybe_send_embed()` now supresses all mentions, including user mentions (:issue:`4192`)
- The default value of the ``filter`` keyword argument has been changed to ``None`` (:issue:`3845`) - The default value of the ``filter`` keyword argument has been changed to ``None`` (:issue:`3845`)
- Cog package names (i.e. name of the folder the cog is in and the name used when loading the cog) now have to be `valid Python identifiers <https://docs.python.org/3/reference/lexical_analysis.html#identifiers>`_ (:issue:`3605`, :issue:`3679`) - Cog package names (i.e. name of the folder the cog is in and the name used when loading the cog) now have to be `valid Python identifiers <https://docs.python.org/3/reference/lexical_analysis.html#identifiers>`_ (:issue:`3605`, :issue:`3679`)
- Method/attribute names starting with ``red_`` or being in the form of ``__red_*__`` are now reserved. See `version_guarantees` for more information (:issue:`4085`) - Method/attribute names starting with ``red_`` or being in the form of ``__red_*__`` are now reserved. See `version_guarantees` for more information (:issue:`4085`)

View File

@ -255,7 +255,10 @@ class Context(DPYContext):
embed=discord.Embed(description=message, color=(await self.embed_colour())) embed=discord.Embed(description=message, color=(await self.embed_colour()))
) )
else: else:
return await self.send(message) return await self.send(
message,
allowed_mentions=discord.AllowedMentions(everyone=False, roles=False, users=False),
)
@property @property
def clean_prefix(self) -> str: def clean_prefix(self) -> str: