Add positional-only arguments in more places

This commit is contained in:
jack1142
2022-02-20 02:28:01 +01:00
committed by GitHub
parent 19b10eecfe
commit dc19c6c7d5
14 changed files with 202 additions and 23 deletions

View File

@@ -1376,7 +1376,7 @@ class Message(Hashable):
await self._state.http.unpin_message(self.channel.id, self.id, reason=reason)
self.pinned = False
async def add_reaction(self, emoji: EmojiInputType) -> None:
async def add_reaction(self, emoji: EmojiInputType, /) -> None:
"""|coro|
Add a reaction to the message.
@@ -1387,6 +1387,10 @@ class Message(Hashable):
to use this. If nobody else has reacted to the message using this
emoji, the :attr:`~Permissions.add_reactions` permission is required.
.. versionchanged:: 2.0
``emoji`` parameter is now positional-only.
Parameters
------------
emoji: Union[:class:`Emoji`, :class:`Reaction`, :class:`PartialEmoji`, :class:`str`]