mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Fix migration guide docs for abc.PrivateChannel and cooldown()
* Move PrivateChannel ABC change to proper subsection in migration guide * Add change to the accepted callables in cooldown() to migration guide
This commit is contained in:
parent
6725f329b2
commit
7c218b3833
@ -2453,6 +2453,10 @@ def cooldown(
|
|||||||
|
|
||||||
.. versionchanged:: 1.7
|
.. versionchanged:: 1.7
|
||||||
Callables are now supported for custom bucket types.
|
Callables are now supported for custom bucket types.
|
||||||
|
|
||||||
|
.. versionchanged:: 2.0
|
||||||
|
When passing a callable, it now needs to accept :class:`.Context`
|
||||||
|
rather than :class:`~discord.Message` as its only argument.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:
|
def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]:
|
||||||
|
@ -153,7 +153,6 @@ The following have been changed to :func:`runtime-checkable <typing.runtime_chec
|
|||||||
|
|
||||||
- :class:`abc.Snowflake`
|
- :class:`abc.Snowflake`
|
||||||
- :class:`abc.User`
|
- :class:`abc.User`
|
||||||
- :class:`abc.PrivateChannel`
|
|
||||||
|
|
||||||
The following have been changed to subclass :class:`~typing.Protocol`:
|
The following have been changed to subclass :class:`~typing.Protocol`:
|
||||||
|
|
||||||
@ -163,6 +162,7 @@ The following have been changed to subclass :class:`~typing.Protocol`:
|
|||||||
The following have been changed to use the default metaclass instead of :class:`abc.ABCMeta`:
|
The following have been changed to use the default metaclass instead of :class:`abc.ABCMeta`:
|
||||||
|
|
||||||
- :class:`abc.Messageable`
|
- :class:`abc.Messageable`
|
||||||
|
- :class:`abc.PrivateChannel`
|
||||||
|
|
||||||
``datetime`` Objects Are Now UTC-Aware
|
``datetime`` Objects Are Now UTC-Aware
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -1472,6 +1472,8 @@ Miscellaneous Changes
|
|||||||
|
|
||||||
- To override a cog, the new ``override`` parameter can be used.
|
- To override a cog, the new ``override`` parameter can be used.
|
||||||
|
|
||||||
|
- When passing a callable to ``type`` argument of :meth:`~ext.commands.cooldown`,
|
||||||
|
it now needs to accept :class:`~ext.commands.Context` rather than :class:`Message` as its only argument.
|
||||||
- Metaclass of :class:`~ext.commands.Context` changed from :class:`abc.ABCMeta` to :class:`type`.
|
- Metaclass of :class:`~ext.commands.Context` changed from :class:`abc.ABCMeta` to :class:`type`.
|
||||||
- Changed type of :attr:`ext.commands.Command.clean_params` from :class:`collections.OrderedDict` to :class:`dict`.
|
- Changed type of :attr:`ext.commands.Command.clean_params` from :class:`collections.OrderedDict` to :class:`dict`.
|
||||||
As the latter is guaranteed to preserve insertion order since Python 3.7.
|
As the latter is guaranteed to preserve insertion order since Python 3.7.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user