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:
jack1142
2020-08-10 21:19:00 +02:00
committed by GitHub
parent 7707c862d1
commit 05ef5fa3a6
8 changed files with 28 additions and 25 deletions

View File

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