mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-21 10:26:47 +00:00
Update sphinx and fix documentation issues
This commit is contained in:
parent
dede5539ee
commit
4dbe1af32f
@ -1274,9 +1274,9 @@ class StageChannel(VocalGuildChannel):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
The stage instance or channel could not be found.
|
The stage instance or channel could not be found.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Getting the stage instance failed.
|
Getting the stage instance failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
@ -475,9 +475,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
:exc:`.LoginFailure`
|
LoginFailure
|
||||||
The wrong credentials are passed.
|
The wrong credentials are passed.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
An unknown HTTP related error occurred,
|
An unknown HTTP related error occurred,
|
||||||
usually when it isn't 200 or the known incorrect credentials
|
usually when it isn't 200 or the known incorrect credentials
|
||||||
passing status code.
|
passing status code.
|
||||||
@ -506,10 +506,10 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.GatewayNotFound`
|
GatewayNotFound
|
||||||
If the gateway to connect to Discord is not found. Usually if this
|
If the gateway to connect to Discord is not found. Usually if this
|
||||||
is thrown then there is a Discord API outage.
|
is thrown then there is a Discord API outage.
|
||||||
:exc:`.ConnectionClosed`
|
ConnectionClosed
|
||||||
The websocket connection has been terminated.
|
The websocket connection has been terminated.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1106,7 +1106,7 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
:exc:`.InvalidArgument`
|
InvalidArgument
|
||||||
If the ``activity`` parameter is not the proper type.
|
If the ``activity`` parameter is not the proper type.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1186,7 +1186,7 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Getting the guilds failed.
|
Getting the guilds failed.
|
||||||
|
|
||||||
Yields
|
Yields
|
||||||
@ -1261,9 +1261,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
The template is invalid.
|
The template is invalid.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Getting the template failed.
|
Getting the template failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1300,9 +1300,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
:exc:`.Forbidden`
|
Forbidden
|
||||||
You do not have access to the guild.
|
You do not have access to the guild.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Getting the guild failed.
|
Getting the guild failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1348,9 +1348,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Guild creation failed.
|
Guild creation failed.
|
||||||
:exc:`.InvalidArgument`
|
InvalidArgument
|
||||||
Invalid icon image format given. Must be PNG or JPG.
|
Invalid icon image format given. Must be PNG or JPG.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1386,9 +1386,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
The stage instance or channel could not be found.
|
The stage instance or channel could not be found.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Getting the stage instance failed.
|
Getting the stage instance failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1429,9 +1429,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
The invite has expired or is invalid.
|
The invite has expired or is invalid.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Getting the invite failed.
|
Getting the invite failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1463,11 +1463,11 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.Forbidden`
|
Forbidden
|
||||||
You do not have permissions to revoke invites.
|
You do not have permissions to revoke invites.
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
The invite is invalid or expired.
|
The invite is invalid or expired.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Revoking the invite failed.
|
Revoking the invite failed.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -1496,9 +1496,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.Forbidden`
|
Forbidden
|
||||||
The widget for this guild is disabled.
|
The widget for this guild is disabled.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the widget failed.
|
Retrieving the widget failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1517,7 +1517,7 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the information failed somehow.
|
Retrieving the information failed somehow.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1552,9 +1552,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
A user with this ID does not exist.
|
A user with this ID does not exist.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Fetching the user failed.
|
Fetching the user failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1582,13 +1582,13 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.InvalidData`
|
InvalidData
|
||||||
An unknown channel type was received from Discord.
|
An unknown channel type was received from Discord.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the channel failed.
|
Retrieving the channel failed.
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
Invalid Channel ID.
|
Invalid Channel ID.
|
||||||
:exc:`.Forbidden`
|
Forbidden
|
||||||
You do not have permission to fetch this channel.
|
You do not have permission to fetch this channel.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1625,11 +1625,11 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
--------
|
--------
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the webhook failed.
|
Retrieving the webhook failed.
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
Invalid webhook ID.
|
Invalid webhook ID.
|
||||||
:exc:`.Forbidden`
|
Forbidden
|
||||||
You do not have permission to fetch this webhook.
|
You do not have permission to fetch this webhook.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1649,9 +1649,9 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
--------
|
--------
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the sticker failed.
|
Retrieving the sticker failed.
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
Invalid sticker ID.
|
Invalid sticker ID.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -1672,7 +1672,7 @@ class Client:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the sticker packs failed.
|
Retrieving the sticker packs failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
@ -548,7 +548,7 @@ class BotBase(GroupMixin):
|
|||||||
The cog does not inherit from :class:`.Cog`.
|
The cog does not inherit from :class:`.Cog`.
|
||||||
CommandError
|
CommandError
|
||||||
An error happened during loading.
|
An error happened during loading.
|
||||||
.ClientException
|
ClientException
|
||||||
A cog with the same name is already loaded.
|
A cog with the same name is already loaded.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -130,9 +130,9 @@ class Converter(Protocol[T_co]):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.CommandError`
|
CommandError
|
||||||
A generic exception occurred when converting the argument.
|
A generic exception occurred when converting the argument.
|
||||||
:exc:`.BadArgument`
|
BadArgument
|
||||||
The converter failed to convert the argument.
|
The converter failed to convert the argument.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError('Derived classes need to implement this.')
|
raise NotImplementedError('Derived classes need to implement this.')
|
||||||
|
@ -1184,7 +1184,7 @@ class GroupMixin(Generic[CogT]):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.CommandRegistrationError`
|
CommandRegistrationError
|
||||||
If the command or its alias is already registered by different command.
|
If the command or its alias is already registered by different command.
|
||||||
TypeError
|
TypeError
|
||||||
If the command passed is not a subclass of :class:`.Command`.
|
If the command passed is not a subclass of :class:`.Command`.
|
||||||
|
@ -1802,15 +1802,15 @@ class Guild(Hashable):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`.InvalidData`
|
InvalidData
|
||||||
An unknown channel type was received from Discord
|
An unknown channel type was received from Discord
|
||||||
or the guild the channel belongs to is not the same
|
or the guild the channel belongs to is not the same
|
||||||
as the one in this object points to.
|
as the one in this object points to.
|
||||||
:exc:`.HTTPException`
|
HTTPException
|
||||||
Retrieving the channel failed.
|
Retrieving the channel failed.
|
||||||
:exc:`.NotFound`
|
NotFound
|
||||||
Invalid Channel ID.
|
Invalid Channel ID.
|
||||||
:exc:`.Forbidden`
|
Forbidden
|
||||||
You do not have permission to fetch this channel.
|
You do not have permission to fetch this channel.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
@ -427,7 +427,7 @@ class Role(Hashable):
|
|||||||
or :class:`str` representing unicode emoji that should be used as a role icon.
|
or :class:`str` representing unicode emoji that should be used as a role icon.
|
||||||
Could be ``None`` to denote removal of the icon.
|
Could be ``None`` to denote removal of the icon.
|
||||||
Only PNG/JPEG is supported.
|
Only PNG/JPEG is supported.
|
||||||
This is only available to guilds that contain ``ROLE_ICONS`` in :attr:`features`.
|
This is only available to guilds that contain ``ROLE_ICONS`` in :attr:`Guild.features`.
|
||||||
mentionable: :class:`bool`
|
mentionable: :class:`bool`
|
||||||
Indicates if the role should be mentionable by others.
|
Indicates if the role should be mentionable by others.
|
||||||
position: :class:`int`
|
position: :class:`int`
|
||||||
|
@ -636,9 +636,8 @@ class Thread(Messageable, Hashable):
|
|||||||
|
|
||||||
Adds a user to this thread.
|
Adds a user to this thread.
|
||||||
|
|
||||||
You must have :attr:`~Permissions.send_messages` and :attr:`~Permissions.use_threads`
|
You must have :attr:`~Permissions.send_messages_in_threads` to add a user to a thread.
|
||||||
to add a user to a public thread. If the thread is private then :attr:`~Permissions.send_messages`
|
If the thread is private then and :attr:`invitable` is ``False`` then :attr:`~Permissions.manage_messages`
|
||||||
and either :attr:`~Permissions.use_private_threads` or :attr:`~Permissions.manage_messages`
|
|
||||||
is required to add a user to the thread.
|
is required to add a user to the thread.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
|
@ -3157,7 +3157,7 @@ AuditLogDiff
|
|||||||
|
|
||||||
Integration emoticons were enabled or disabled.
|
Integration emoticons were enabled or disabled.
|
||||||
|
|
||||||
see also :attr:`Integration.enable_emoticons`
|
see also :attr:`StreamIntegration.enable_emoticons`
|
||||||
|
|
||||||
:type: :class:`bool`
|
:type: :class:`bool`
|
||||||
|
|
||||||
@ -3166,7 +3166,7 @@ AuditLogDiff
|
|||||||
|
|
||||||
The behaviour of expiring subscribers changed.
|
The behaviour of expiring subscribers changed.
|
||||||
|
|
||||||
see also :attr:`Integration.expire_grace_period`
|
see also :attr:`StreamIntegration.expire_behaviour`
|
||||||
|
|
||||||
:type: :class:`ExpireBehaviour`
|
:type: :class:`ExpireBehaviour`
|
||||||
|
|
||||||
@ -3174,7 +3174,7 @@ AuditLogDiff
|
|||||||
|
|
||||||
The grace period before expiring subscribers changed.
|
The grace period before expiring subscribers changed.
|
||||||
|
|
||||||
see also :attr:`Integration.expire_grace_period`
|
see also :attr:`StreamIntegration.expire_grace_period`
|
||||||
|
|
||||||
:type: :class:`int`
|
:type: :class:`int`
|
||||||
|
|
||||||
|
2
setup.py
2
setup.py
@ -36,7 +36,7 @@ with open('README.rst') as f:
|
|||||||
extras_require = {
|
extras_require = {
|
||||||
'voice': ['PyNaCl>=1.3.0,<1.5'],
|
'voice': ['PyNaCl>=1.3.0,<1.5'],
|
||||||
'docs': [
|
'docs': [
|
||||||
'sphinx==4.0.2',
|
'sphinx==4.4.0',
|
||||||
'sphinxcontrib_trio==1.1.2',
|
'sphinxcontrib_trio==1.1.2',
|
||||||
'sphinxcontrib-websupport',
|
'sphinxcontrib-websupport',
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user