[docs] Update Sphinx and Fix various references

Co-Authored-By: Riley Shaw <30989490+ShineyDev@users.noreply.github.com>
This commit is contained in:
Josh
2021-06-28 13:43:49 +10:00
committed by GitHub
parent 76c9e390f1
commit 233d10649c
10 changed files with 24 additions and 21 deletions

View File

@ -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

View File

@ -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

View File

@ -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
------

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -123,7 +123,7 @@ class Item(Generic[V]):
Parameters
-----------
interaction: :class:`Interaction`
interaction: :class:`.Interaction`
The interaction that triggered this UI item.
"""
pass