mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 20:28:38 +00:00
Update Sphinx to 2.1.2
This commit is contained in:
parent
0cf38241d0
commit
7543328fe7
@ -490,7 +490,7 @@ class GuildChannel:
|
|||||||
|
|
||||||
Deletes the channel.
|
Deletes the channel.
|
||||||
|
|
||||||
You must have :attr:`~.Permissions.manage_channels` permission to use this.
|
You must have :attr:`~Permissions.manage_channels` permission to use this.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
@ -500,11 +500,11 @@ class GuildChannel:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have proper permissions to delete the channel.
|
You do not have proper permissions to delete the channel.
|
||||||
:exc:`~discord.NotFound`
|
~discord.NotFound
|
||||||
The channel was not found or was already deleted.
|
The channel was not found or was already deleted.
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Deleting the channel failed.
|
Deleting the channel failed.
|
||||||
"""
|
"""
|
||||||
await self._state.http.delete_channel(self.id, reason=reason)
|
await self._state.http.delete_channel(self.id, reason=reason)
|
||||||
@ -527,7 +527,7 @@ class GuildChannel:
|
|||||||
If the ``overwrite`` parameter is ``None``, then the permission
|
If the ``overwrite`` parameter is ``None``, then the permission
|
||||||
overwrites are deleted.
|
overwrites are deleted.
|
||||||
|
|
||||||
You must have the :attr:`~.Permissions.manage_roles` permission to use this.
|
You must have the :attr:`~Permissions.manage_roles` permission to use this.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
----------
|
----------
|
||||||
@ -562,13 +562,13 @@ class GuildChannel:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have permissions to edit channel specific permissions.
|
You do not have permissions to edit channel specific permissions.
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Editing channel specific permissions failed.
|
Editing channel specific permissions failed.
|
||||||
:exc:`~discord.NotFound`
|
~discord.NotFound
|
||||||
The role or member being edited is not part of the guild.
|
The role or member being edited is not part of the guild.
|
||||||
:exc:`~discord.InvalidArgument`
|
~discord.InvalidArgument
|
||||||
The overwrite parameter invalid or the target type was not
|
The overwrite parameter invalid or the target type was not
|
||||||
:class:`~discord.Role` or :class:`~discord.Member`.
|
:class:`~discord.Role` or :class:`~discord.Member`.
|
||||||
"""
|
"""
|
||||||
@ -636,9 +636,9 @@ class GuildChannel:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have the proper permissions to create this channel.
|
You do not have the proper permissions to create this channel.
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Creating the channel failed.
|
Creating the channel failed.
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
@ -648,7 +648,7 @@ class GuildChannel:
|
|||||||
|
|
||||||
Creates an instant invite.
|
Creates an instant invite.
|
||||||
|
|
||||||
You must have the :attr:`~.Permissions.create_instant_invite` permission to
|
You must have the :attr:`~Permissions.create_instant_invite` permission to
|
||||||
do this.
|
do this.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
@ -671,7 +671,7 @@ class GuildChannel:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Invite creation failed.
|
Invite creation failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -688,13 +688,13 @@ class GuildChannel:
|
|||||||
|
|
||||||
Returns a list of all active instant invites from this channel.
|
Returns a list of all active instant invites from this channel.
|
||||||
|
|
||||||
You must have :attr:`~.Permissions.manage_guild` to get this information.
|
You must have :attr:`~Permissions.manage_guild` to get this information.
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have proper permissions to get the information.
|
You do not have proper permissions to get the information.
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
An error occurred while fetching the information.
|
An error occurred while fetching the information.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -774,11 +774,11 @@ class Messageable(metaclass=abc.ABCMeta):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
--------
|
--------
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Sending the message failed.
|
Sending the message failed.
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have the proper permissions to send the message.
|
You do not have the proper permissions to send the message.
|
||||||
:exc:`~discord.InvalidArgument`
|
~discord.InvalidArgument
|
||||||
The ``files`` list is not of the appropriate size or
|
The ``files`` list is not of the appropriate size or
|
||||||
you specified both ``file`` and ``files``.
|
you specified both ``file`` and ``files``.
|
||||||
|
|
||||||
@ -871,11 +871,11 @@ class Messageable(metaclass=abc.ABCMeta):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
--------
|
--------
|
||||||
:exc:`~discord.NotFound`
|
~discord.NotFound
|
||||||
The specified message was not found.
|
The specified message was not found.
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have the permissions required to get a message.
|
You do not have the permissions required to get a message.
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Retrieving the message failed.
|
Retrieving the message failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -901,7 +901,7 @@ class Messageable(metaclass=abc.ABCMeta):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
Retrieving the pinned messages failed.
|
Retrieving the pinned messages failed.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
@ -918,7 +918,7 @@ class Messageable(metaclass=abc.ABCMeta):
|
|||||||
def history(self, *, limit=100, before=None, after=None, around=None, oldest_first=None):
|
def history(self, *, limit=100, before=None, after=None, around=None, oldest_first=None):
|
||||||
"""Returns an :class:`~discord.AsyncIterator` that enables receiving the destination's message history.
|
"""Returns an :class:`~discord.AsyncIterator` that enables receiving the destination's message history.
|
||||||
|
|
||||||
You must have :attr:`~.Permissions.read_message_history` permissions to use this.
|
You must have :attr:`~Permissions.read_message_history` permissions to use this.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
---------
|
---------
|
||||||
@ -960,9 +960,9 @@ class Messageable(metaclass=abc.ABCMeta):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
:exc:`~discord.Forbidden`
|
~discord.Forbidden
|
||||||
You do not have permissions to get channel message history.
|
You do not have permissions to get channel message history.
|
||||||
:exc:`~discord.HTTPException`
|
~discord.HTTPException
|
||||||
The request to get message history failed.
|
The request to get message history failed.
|
||||||
|
|
||||||
Yields
|
Yields
|
||||||
@ -1008,11 +1008,11 @@ class Connectable(metaclass=abc.ABCMeta):
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
-------
|
-------
|
||||||
:exc:`asyncio.TimeoutError`
|
asyncio.TimeoutError
|
||||||
Could not connect to the voice channel in time.
|
Could not connect to the voice channel in time.
|
||||||
:exc:`~discord.ClientException`
|
~discord.ClientException
|
||||||
You are already connected to a voice channel.
|
You are already connected to a voice channel.
|
||||||
:exc:`~discord.opus.OpusNotLoaded`
|
~discord.opus.OpusNotLoaded
|
||||||
The opus library has not been loaded.
|
The opus library has not been loaded.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
@ -206,7 +206,12 @@ class Asset:
|
|||||||
|
|
||||||
Raises
|
Raises
|
||||||
------
|
------
|
||||||
Same as :meth:`read`.
|
DiscordException
|
||||||
|
There was no valid URL or internal connection state.
|
||||||
|
HTTPException
|
||||||
|
Downloading the asset failed.
|
||||||
|
NotFound
|
||||||
|
The asset was deleted.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
--------
|
--------
|
||||||
|
11
docs/_static/style.css
vendored
11
docs/_static/style.css
vendored
@ -291,6 +291,17 @@ dl.field-list > dt {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* remove flex from field lists */
|
||||||
|
dl.field-list {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* internal references are forced to bold for some reason */
|
||||||
|
a.reference.internal > strong {
|
||||||
|
font-weight: unset;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
div.danger, div.error {
|
div.danger, div.error {
|
||||||
background-color: #ffe4e4;
|
background-color: #ffe4e4;
|
||||||
border: 1px solid #f66;
|
border: 1px solid #f66;
|
||||||
|
40
docs/api.rst
40
docs/api.rst
@ -1562,14 +1562,16 @@ Certain utilities make working with async iterators easier, detailed below.
|
|||||||
Iterates over the contents of the async iterator.
|
Iterates over the contents of the async iterator.
|
||||||
|
|
||||||
|
|
||||||
.. comethod:: next()
|
.. method:: next()
|
||||||
|
:async:
|
||||||
|
|
||||||
|coro|
|
|coro|
|
||||||
|
|
||||||
Advances the iterator by one, if possible. If no more items are found
|
Advances the iterator by one, if possible. If no more items are found
|
||||||
then this raises :exc:`NoMoreItems`.
|
then this raises :exc:`NoMoreItems`.
|
||||||
|
|
||||||
.. comethod:: get(**attrs)
|
.. method:: get(**attrs)
|
||||||
|
:async:
|
||||||
|
|
||||||
|coro|
|
|coro|
|
||||||
|
|
||||||
@ -1579,7 +1581,8 @@ Certain utilities make working with async iterators easier, detailed below.
|
|||||||
|
|
||||||
msg = await channel.history().get(author__name='Dave')
|
msg = await channel.history().get(author__name='Dave')
|
||||||
|
|
||||||
.. comethod:: find(predicate)
|
.. method:: find(predicate)
|
||||||
|
:async:
|
||||||
|
|
||||||
|coro|
|
|coro|
|
||||||
|
|
||||||
@ -1598,7 +1601,8 @@ Certain utilities make working with async iterators easier, detailed below.
|
|||||||
:param predicate: The predicate to use. Could be a |coroutine_link|_.
|
:param predicate: The predicate to use. Could be a |coroutine_link|_.
|
||||||
:return: The first element that returns ``True`` for the predicate or ``None``.
|
:return: The first element that returns ``True`` for the predicate or ``None``.
|
||||||
|
|
||||||
.. comethod:: flatten()
|
.. method:: flatten()
|
||||||
|
:async:
|
||||||
|
|
||||||
|coro|
|
|coro|
|
||||||
|
|
||||||
@ -2009,10 +2013,10 @@ module, others which are not.
|
|||||||
:members:
|
:members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: discord.abc.Messageable.history
|
.. automethod:: discord.abc.Messageable.history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: discord.abc.Messageable.typing
|
.. automethod:: discord.abc.Messageable.typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
.. autoclass:: discord.abc.Connectable
|
.. autoclass:: discord.abc.Connectable
|
||||||
@ -2065,10 +2069,10 @@ User
|
|||||||
:inherited-members:
|
:inherited-members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: history
|
.. automethod:: history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: typing
|
.. automethod:: typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
Attachment
|
Attachment
|
||||||
@ -2096,7 +2100,7 @@ Reaction
|
|||||||
:members:
|
:members:
|
||||||
:exclude-members: users
|
:exclude-members: users
|
||||||
|
|
||||||
.. autocomethod:: users
|
.. automethod:: users
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
CallMessage
|
CallMessage
|
||||||
@ -2118,7 +2122,7 @@ Guild
|
|||||||
:members:
|
:members:
|
||||||
:exclude-members: audit_logs
|
:exclude-members: audit_logs
|
||||||
|
|
||||||
.. autocomethod:: audit_logs
|
.. automethod:: audit_logs
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
Member
|
Member
|
||||||
@ -2129,10 +2133,10 @@ Member
|
|||||||
:inherited-members:
|
:inherited-members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: history
|
.. automethod:: history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: typing
|
.. automethod:: typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
Spotify
|
Spotify
|
||||||
@ -2173,10 +2177,10 @@ TextChannel
|
|||||||
:inherited-members:
|
:inherited-members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: history
|
.. automethod:: history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: typing
|
.. automethod:: typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
VoiceChannel
|
VoiceChannel
|
||||||
@ -2201,10 +2205,10 @@ DMChannel
|
|||||||
:inherited-members:
|
:inherited-members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: history
|
.. automethod:: history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: typing
|
.. automethod:: typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
GroupChannel
|
GroupChannel
|
||||||
@ -2215,10 +2219,10 @@ GroupChannel
|
|||||||
:inherited-members:
|
:inherited-members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: history
|
.. automethod:: history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: typing
|
.. automethod:: typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
PartialInviteGuild
|
PartialInviteGuild
|
||||||
|
@ -35,7 +35,7 @@ extensions = [
|
|||||||
'sphinx.ext.extlinks',
|
'sphinx.ext.extlinks',
|
||||||
'sphinx.ext.intersphinx',
|
'sphinx.ext.intersphinx',
|
||||||
'sphinx.ext.napoleon',
|
'sphinx.ext.napoleon',
|
||||||
'sphinxcontrib.asyncio',
|
'sphinxcontrib_trio',
|
||||||
'details',
|
'details',
|
||||||
'exception_hierarchy'
|
'exception_hierarchy'
|
||||||
]
|
]
|
||||||
|
@ -150,10 +150,10 @@ Context
|
|||||||
:inherited-members:
|
:inherited-members:
|
||||||
:exclude-members: history, typing
|
:exclude-members: history, typing
|
||||||
|
|
||||||
.. autocomethod:: discord.ext.commands.Context.history
|
.. automethod:: discord.ext.commands.Context.history
|
||||||
:async-for:
|
:async-for:
|
||||||
|
|
||||||
.. autocomethod:: discord.ext.commands.Context.typing
|
.. automethod:: discord.ext.commands.Context.typing
|
||||||
:async-with:
|
:async-with:
|
||||||
|
|
||||||
.. _ext_commands_api_converters:
|
.. _ext_commands_api_converters:
|
||||||
|
4
setup.py
4
setup.py
@ -36,8 +36,8 @@ with open('README.rst') as f:
|
|||||||
extras_require = {
|
extras_require = {
|
||||||
'voice': ['PyNaCl==1.3.0'],
|
'voice': ['PyNaCl==1.3.0'],
|
||||||
'docs': [
|
'docs': [
|
||||||
'sphinx==1.7.4',
|
'sphinx==2.1.2',
|
||||||
'sphinxcontrib-asyncio',
|
'sphinxcontrib_trio',
|
||||||
'sphinxcontrib-websupport',
|
'sphinxcontrib-websupport',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user