mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
Preparations for d.py 1.4 (includes breaking changes related to mass mentions) (#3845)
Co-authored-by: PredaaA <46051820+PredaaA@users.noreply.github.com>
This commit is contained in:
@@ -69,12 +69,12 @@ class Context(DPYContext):
|
||||
|
||||
Other Parameters
|
||||
----------------
|
||||
filter : Callable[`str`] -> `str`
|
||||
A function which is used to sanitize the ``content`` before
|
||||
it is sent. Defaults to
|
||||
:func:`~redbot.core.utils.common_filters.filter_mass_mentions`.
|
||||
filter : callable (`str`) -> `str`, optional
|
||||
A function which is used to filter the ``content`` before
|
||||
it is sent.
|
||||
This must take a single `str` as an argument, and return
|
||||
the sanitized `str`.
|
||||
the processed `str`. When `None` is passed, ``content`` won't be touched.
|
||||
Defaults to `None`.
|
||||
**kwargs
|
||||
See `discord.ext.commands.Context.send`.
|
||||
|
||||
@@ -85,7 +85,7 @@ class Context(DPYContext):
|
||||
|
||||
"""
|
||||
|
||||
_filter = kwargs.pop("filter", common_filters.filter_mass_mentions)
|
||||
_filter = kwargs.pop("filter", None)
|
||||
|
||||
if _filter and content:
|
||||
content = _filter(str(content))
|
||||
|
||||
Reference in New Issue
Block a user