Documentation formatting

This commit is contained in:
Skezza 2020-07-01 04:32:00 +01:00 committed by GitHub
parent e7500f738c
commit c3bca7ec73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 11 additions and 11 deletions

View File

@ -420,7 +420,7 @@ class Streaming(BaseActivity):
name: Optional[:class:`str`]
The stream's name.
details: Optional[:class:`str`]
Same as :attr:`name`
An alias for :attr:`name`
game: Optional[:class:`str`]
The game being streamed.

View File

@ -82,7 +82,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
category_id: Optional[:class:`int`]
The category channel ID this channel belongs to, if applicable.
topic: Optional[:class:`str`]
The channel's topic. None if it doesn't exist.
The channel's topic. ``None`` if it doesn't exist.
position: :class:`int`
The position in the channel list. This is a number that starts at 0. e.g. the
top channel is position 0.

View File

@ -28,7 +28,7 @@ import colorsys
class Colour:
"""Represents a Discord role colour. This class is similar
to an (red, green, blue) :class:`tuple`.
to a (red, green, blue) :class:`tuple`.
There is an alias for this called Color.

View File

@ -88,7 +88,7 @@ class Guild(Hashable):
afk_timeout: :class:`int`
The timeout to get sent to the AFK channel.
afk_channel: Optional[:class:`VoiceChannel`]
The channel that denotes the AFK channel. None if it doesn't exist.
The channel that denotes the AFK channel. ``None`` if it doesn't exist.
icon: Optional[:class:`str`]
The guild's icon.
id: :class:`int`
@ -98,7 +98,7 @@ class Guild(Hashable):
unavailable: :class:`bool`
Indicates if the guild is unavailable. If this is ``True`` then the
reliability of other attributes outside of :meth:`Guild.id` is slim and they might
all be None. It is best to not do anything with the guild if it is unavailable.
all be ``None``. It is best to not do anything with the guild if it is unavailable.
Check the :func:`on_guild_unavailable` and :func:`on_guild_available` events.
max_presences: Optional[:class:`int`]

View File

@ -156,7 +156,7 @@ class PartialInviteGuild:
return self.icon_url_as()
def is_icon_animated(self):
""":class:`bool`: Returns True if the guild has an animated icon.
""":class:`bool`: Returns ``True`` if the guild has an animated icon.
.. versionadded:: 1.4
"""

View File

@ -60,7 +60,7 @@ class VoiceState:
afk: :class:`bool`
Indicates if the user is currently in the AFK channel in the guild.
channel: Optional[:class:`VoiceChannel`]
The voice channel that the user is currently connected to. None if the user
The voice channel that the user is currently connected to. ``None`` if the user
is not currently in a voice channel.
"""
@ -373,7 +373,7 @@ class Member(discord.abc.Messageable, _BaseUser):
@property
def activity(self):
"""Union[:class:`BaseActivity`, :class:`Spotify`]: Returns the primary
activity the user is currently doing. Could be None if no activity is being done.
activity the user is currently doing. Could be ``None`` if no activity is being done.
.. note::

View File

@ -148,7 +148,7 @@ class Permissions(BaseFlags):
@classmethod
def all(cls):
"""A factory method that creates a :class:`Permissions` with all
permissions set to True."""
permissions set to ``True``."""
return cls(0b01111111111111111111111111111111)
@classmethod

View File

@ -55,7 +55,7 @@ class Template:
Attributes
-----------
code: :code:`str`
code: :class:`str`
The template code.
uses: :class:`int`
How many time the template has been used.

View File

@ -303,7 +303,7 @@ class ClientUser(BaseUser):
discriminator: :class:`str`
The user's discriminator. This is given when the username has conflicts.
avatar: Optional[:class:`str`]
The avatar hash the user has. Could be None.
The avatar hash the user has. Could be ``None``.
bot: :class:`bool`
Specifies if the user is a bot account.
system: :class:`bool`