aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh <[email protected]>2021-06-28 13:43:49 +1000
committerGitHub <[email protected]>2021-06-27 23:43:49 -0400
commit233d10649c8bc39f1ecc2be83df547f3ad6a3f84 (patch)
treee5353b7407415762065654b229543bd5c0773096
parentremove repeat 'to' in Task.restart doc (diff)
downloaddiscord.py-233d10649c8bc39f1ecc2be83df547f3ad6a3f84.tar.xz
discord.py-233d10649c8bc39f1ecc2be83df547f3ad6a3f84.zip
[docs] Update Sphinx and Fix various references
Co-Authored-By: Riley Shaw <[email protected]>
-rw-r--r--discord/abc.py2
-rw-r--r--discord/appinfo.py2
-rw-r--r--discord/channel.py2
-rw-r--r--discord/client.py8
-rw-r--r--discord/components.py2
-rw-r--r--discord/ui/button.py14
-rw-r--r--discord/ui/item.py2
-rw-r--r--docs/_static/style.css9
-rw-r--r--docs/api.rst2
-rw-r--r--setup.py2
10 files changed, 24 insertions, 21 deletions
diff --git a/discord/abc.py b/discord/abc.py
index ac80778f..cef45b80 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -1043,7 +1043,7 @@ class GuildChannel:
invite.
reason: Optional[:class:`str`]
The reason for creating this invite. Shows up on the audit log.
- target_type: Optional[:class:`InviteTarget`]
+ target_type: Optional[:class:`.InviteTarget`]
The type of target for the voice channel invite, if any.
.. versionadded:: 2.0
diff --git a/discord/appinfo.py b/discord/appinfo.py
index 47ec1069..67082abd 100644
--- a/discord/appinfo.py
+++ b/discord/appinfo.py
@@ -196,7 +196,7 @@ class AppInfo:
return self._state._get_guild(self.guild_id)
class PartialAppInfo:
- """Represents a partial AppInfo given by :func:`~GuildChannel.create_invite`
+ """Represents a partial AppInfo given by :func:`~discord.abc.GuildChannel.create_invite`
.. versionadded:: 2.0
diff --git a/discord/channel.py b/discord/channel.py
index c1b95752..b7f57146 100644
--- a/discord/channel.py
+++ b/discord/channel.py
@@ -1083,7 +1083,7 @@ class StageChannel(VocalGuildChannel):
topic: :class:`str`
The stage instance's topic.
privacy_level: :class:`StagePrivacyLevel`
- The stage instance's privacy level. Defaults to :attr:`PrivacyLevel.guild_only`.
+ The stage instance's privacy level. Defaults to :attr:`StagePrivacyLevel.guild_only`.
Raises
------
diff --git a/discord/client.py b/discord/client.py
index 4f53c15e..64c9a678 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -706,7 +706,7 @@ class Client:
Returns
--------
- Optional[:class:`StageInstance`]
+ Optional[:class:`.StageInstance`]
The returns stage instance of ``None`` if not found.
"""
from .channel import StageChannel
@@ -1162,7 +1162,7 @@ class Client:
async def fetch_stage_instance(self, channel_id: int) -> StageInstance:
"""|coro|
- Gets a :class:`StageInstance` for a stage channel id.
+ Gets a :class:`.StageInstance` for a stage channel id.
.. versionadded:: 2.0
@@ -1180,7 +1180,7 @@ class Client:
Returns
--------
- :class:`StageInstance`
+ :class:`.StageInstance`
The stage instance from the stage channel ID.
"""
data = await self.http.get_stage_instance(channel_id)
@@ -1466,5 +1466,5 @@ class Client:
@property
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."""
return self._connection.persistent_views
diff --git a/discord/components.py b/discord/components.py
index 77d6ddd4..5edf9acd 100644
--- a/discord/components.py
+++ b/discord/components.py
@@ -136,7 +136,7 @@ class Button(Component):
Attributes
-----------
- style: :class:`ComponentButtonStyle`
+ style: :class:`.ButtonStyle`
The style of the button.
custom_id: Optional[:class:`str`]
The ID of the button that gets received during an interaction.
diff --git a/discord/ui/button.py b/discord/ui/button.py
index 741b262c..e5dc8a96 100644
--- a/discord/ui/button.py
+++ b/discord/ui/button.py
@@ -65,7 +65,7 @@ class Button(Item[V]):
Whether the button is disabled or not.
label: Optional[:class:`str`]
The label of the button, if any.
- emoji: Optional[Union[:class:`PartialEmoji`, :class:`Emoji`, :class:`str`]]
+ emoji: Optional[Union[:class:`.PartialEmoji`, :class:`.Emoji`, :class:`str`]]
The emoji of the button, if available.
row: Optional[:class:`int`]
The relative row this button belongs to. A Discord component can only have 5
@@ -180,7 +180,7 @@ class Button(Item[V]):
@property
def emoji(self) -> Optional[PartialEmoji]:
- """Optional[:class:`PartialEmoji`]: The emoji of the button, if available."""
+ """Optional[:class:`.PartialEmoji`]: The emoji of the button, if available."""
return self._underlying.emoji
@emoji.setter
@@ -251,13 +251,13 @@ def button(
custom_id: Optional[:class:`str`]
The ID of the button that gets received during an interaction.
It is recommended not to set this parameter to prevent conflicts.
- style: :class:`ButtonStyle`
- The style of the button. Defaults to :attr:`ButtonStyle.grey`.
+ style: :class:`.ButtonStyle`
+ The style of the button. Defaults to :attr:`.ButtonStyle.grey`.
disabled: :class:`bool`
Whether the button is disabled or not. Defaults to ``False``.
- emoji: Optional[Union[:class:`str`, :class:`Emoji`, :class:`PartialEmoji`]]
- The emoji of the button. This can be in string form or a :class:`PartialEmoji`
- or a full :class:`Emoji`.
+ emoji: Optional[Union[:class:`str`, :class:`.Emoji`, :class:`.PartialEmoji`]]
+ The emoji of the button. This can be in string form or a :class:`.PartialEmoji`
+ or a full :class:`.Emoji`.
row: Optional[:class:`int`]
The relative row this button belongs to. A Discord component can only have 5
rows. By default, items are arranged automatically into those 5 rows. If you'd
diff --git a/discord/ui/item.py b/discord/ui/item.py
index 3a7c76f3..5b234ae7 100644
--- a/discord/ui/item.py
+++ b/discord/ui/item.py
@@ -123,7 +123,7 @@ class Item(Generic[V]):
Parameters
-----------
- interaction: :class:`Interaction`
+ interaction: :class:`.Interaction`
The interaction that triggered this UI item.
"""
pass
diff --git a/docs/_static/style.css b/docs/_static/style.css
index 0a0bf875..b08ac893 100644
--- a/docs/_static/style.css
+++ b/docs/_static/style.css
@@ -772,8 +772,7 @@ li > blockquote {
/* admonitions */
div.admonition {
- padding: 0 0.8em;
- padding-bottom: 0.8em;
+ padding: 0 0.8em 0.8em 0.8em !important;
margin: 0.8em 0;
border-radius: 2.5px;
border-left-width: 6px;
@@ -783,7 +782,7 @@ div.admonition {
p.admonition-title {
font-weight: bold;
- margin: 0 -0.8rem;
+ margin: 0 -0.8rem !important;
padding: 0.4rem 0.6rem 0.4rem 2.5rem;
position: relative;
-moz-user-select: none;
@@ -1142,6 +1141,10 @@ table.docutils tbody tr td ol.last {
margin-bottom: 0;
}
+.align-default {
+ text-align: left !important;
+}
+
/* hide the welcome text */
section#welcome-to-discord-py > h1 {
display: none;
diff --git a/docs/api.rst b/docs/api.rst
index 90d013f9..1d681c78 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -2236,7 +2236,7 @@ of :class:`enum.Enum`.
.. attribute:: remove_role
- This will remove the :attr:`Integration.role` from the user
+ This will remove the :attr:`StreamIntegration.role` from the user
when their subscription is finished.
.. attribute:: kick
diff --git a/setup.py b/setup.py
index cee70b98..bdf1549f 100644
--- a/setup.py
+++ b/setup.py
@@ -36,7 +36,7 @@ with open('README.rst') as f:
extras_require = {
'voice': ['PyNaCl>=1.3.0,<1.5'],
'docs': [
- 'sphinx==3.5.4',
+ 'sphinx==4.0.2',
'sphinxcontrib_trio==1.1.2',
'sphinxcontrib-websupport',
]