mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-01-17 19:45:12 +00:00
Add positional-only arguments in more places
This commit is contained in:
@@ -360,7 +360,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
{'topic': self.topic, 'nsfw': self.nsfw, 'rate_limit_per_user': self.slowmode_delay}, name=name, reason=reason
|
||||
)
|
||||
|
||||
async def delete_messages(self, messages: Iterable[Snowflake]) -> None:
|
||||
async def delete_messages(self, messages: Iterable[Snowflake], /) -> None:
|
||||
"""|coro|
|
||||
|
||||
Deletes a list of messages. This is similar to :meth:`Message.delete`
|
||||
@@ -376,6 +376,10 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
You must have the :attr:`~Permissions.manage_messages` permission to
|
||||
use this.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``messages`` parameter is now positional-only.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
messages: Iterable[:class:`abc.Snowflake`]
|
||||
@@ -639,6 +643,10 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
|
||||
.. versionadded:: 1.6
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``message_id`` parameter is now positional-only.
|
||||
|
||||
Parameters
|
||||
------------
|
||||
message_id: :class:`int`
|
||||
@@ -1796,6 +1804,10 @@ class DMChannel(discord.abc.Messageable, Hashable):
|
||||
- :attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a DM.
|
||||
- :attr:`~Permissions.manage_messages`: You cannot delete others messages in a DM.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``obj`` parameter is now positional-only.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
obj: :class:`User`
|
||||
@@ -1822,6 +1834,10 @@ class DMChannel(discord.abc.Messageable, Hashable):
|
||||
|
||||
.. versionadded:: 1.6
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``message_id`` parameter is now positional-only.
|
||||
|
||||
Parameters
|
||||
------------
|
||||
message_id: :class:`int`
|
||||
@@ -1943,6 +1959,10 @@ class GroupChannel(discord.abc.Messageable, Hashable):
|
||||
|
||||
This also checks the kick_members permission if the user is the owner.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``obj`` parameter is now positional-only.
|
||||
|
||||
Parameters
|
||||
-----------
|
||||
obj: :class:`~discord.abc.Snowflake`
|
||||
@@ -2028,6 +2048,10 @@ class PartialMessageable(discord.abc.Messageable, Hashable):
|
||||
This is useful if you want to work with a message and only have its ID without
|
||||
doing an unnecessary API call.
|
||||
|
||||
.. versionchanged:: 2.0
|
||||
|
||||
``message_id`` parameter is now positional-only.
|
||||
|
||||
Parameters
|
||||
------------
|
||||
message_id: :class:`int`
|
||||
|
||||
Reference in New Issue
Block a user