mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-13 21:35:30 +00:00
Fix missing or broken versionadded in docstrings
This also documents BadFlagArgument.flag
This commit is contained in:
parent
f7a3ea90b8
commit
6b6bcb92e6
@ -785,6 +785,8 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
|||||||
|
|
||||||
This includes both private and public threads.
|
This includes both private and public threads.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
HTTPException
|
HTTPException
|
||||||
|
@ -328,6 +328,8 @@ class Client:
|
|||||||
If this is not passed via ``__init__`` then this is retrieved
|
If this is not passed via ``__init__`` then this is retrieved
|
||||||
through the gateway when an event contains the data. Usually
|
through the gateway when an event contains the data. Usually
|
||||||
after :func:`~discord.on_connect` is called.
|
after :func:`~discord.on_connect` is called.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
"""
|
"""
|
||||||
return self._connection.application_id
|
return self._connection.application_id
|
||||||
|
|
||||||
@ -335,7 +337,7 @@ class Client:
|
|||||||
def application_flags(self) -> ApplicationFlags:
|
def application_flags(self) -> ApplicationFlags:
|
||||||
""":class:`~discord.ApplicationFlags`: The client's application flags.
|
""":class:`~discord.ApplicationFlags`: The client's application flags.
|
||||||
|
|
||||||
.. versionadded: 2.0
|
.. versionadded:: 2.0
|
||||||
"""
|
"""
|
||||||
return self._connection.application_flags # type: ignore
|
return self._connection.application_flags # type: ignore
|
||||||
|
|
||||||
@ -734,6 +736,8 @@ class Client:
|
|||||||
|
|
||||||
This is useful if you have a channel_id but don't want to do an API call
|
This is useful if you have a channel_id but don't want to do an API call
|
||||||
to send messages to it.
|
to send messages to it.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
@ -744,7 +748,7 @@ class Client:
|
|||||||
|
|
||||||
Returns
|
Returns
|
||||||
--------
|
--------
|
||||||
:class:`PartialMessageable`
|
:class:`.PartialMessageable`
|
||||||
The partial messageable
|
The partial messageable
|
||||||
"""
|
"""
|
||||||
return PartialMessageable(state=self._connection, id=id, type=type)
|
return PartialMessageable(state=self._connection, id=id, type=type)
|
||||||
@ -1575,6 +1579,8 @@ class Client:
|
|||||||
|
|
||||||
This method should be used for when a view is comprised of components
|
This method should be used for when a view is comprised of components
|
||||||
that last longer than the lifecycle of the program.
|
that last longer than the lifecycle of the program.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
------------
|
------------
|
||||||
@ -1604,5 +1610,8 @@ class Client:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def persistent_views(self) -> Sequence[View]:
|
def persistent_views(self) -> Sequence[View]:
|
||||||
"""Sequence[:class:`.View`]: A sequence of persistent views added to the client."""
|
"""Sequence[:class:`.View`]: A sequence of persistent views added to the client.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
"""
|
||||||
return self._connection.persistent_views
|
return self._connection.persistent_views
|
||||||
|
@ -931,6 +931,14 @@ class TooManyFlags(FlagError):
|
|||||||
class BadFlagArgument(FlagError):
|
class BadFlagArgument(FlagError):
|
||||||
"""An exception raised when a flag failed to convert a value.
|
"""An exception raised when a flag failed to convert a value.
|
||||||
|
|
||||||
|
This inherits from :exc:`FlagError`
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
|
Attributes
|
||||||
|
-----------
|
||||||
|
flag: :class:`~discord.ext.commands.Flag`
|
||||||
|
The flag that failed to convert.
|
||||||
"""
|
"""
|
||||||
def __init__(self, flag):
|
def __init__(self, flag):
|
||||||
self.flag = flag
|
self.flag = flag
|
||||||
|
@ -1485,6 +1485,8 @@ class Message(Hashable):
|
|||||||
:attr:`~discord.Permissions.use_threads` in order to create a thread.
|
:attr:`~discord.Permissions.use_threads` in order to create a thread.
|
||||||
|
|
||||||
The channel this message belongs in must be a :class:`TextChannel`.
|
The channel this message belongs in must be a :class:`TextChannel`.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
|
@ -739,6 +739,8 @@ to handle it, which defaults to print a traceback and ignoring the exception.
|
|||||||
|
|
||||||
This requires :attr:`Intents.members` to be enabled.
|
This requires :attr:`Intents.members` to be enabled.
|
||||||
|
|
||||||
|
.. versionadded:: 2.0
|
||||||
|
|
||||||
:param member: The member who joined or left.
|
:param member: The member who joined or left.
|
||||||
:type member: :class:`ThreadMember`
|
:type member: :class:`ThreadMember`
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user