mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-17 03:09:05 +00:00
Documentation formatting
This commit is contained in:
parent
e7500f738c
commit
c3bca7ec73
@ -420,7 +420,7 @@ class Streaming(BaseActivity):
|
|||||||
name: Optional[:class:`str`]
|
name: Optional[:class:`str`]
|
||||||
The stream's name.
|
The stream's name.
|
||||||
details: Optional[:class:`str`]
|
details: Optional[:class:`str`]
|
||||||
Same as :attr:`name`
|
An alias for :attr:`name`
|
||||||
game: Optional[:class:`str`]
|
game: Optional[:class:`str`]
|
||||||
The game being streamed.
|
The game being streamed.
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
|||||||
category_id: Optional[:class:`int`]
|
category_id: Optional[:class:`int`]
|
||||||
The category channel ID this channel belongs to, if applicable.
|
The category channel ID this channel belongs to, if applicable.
|
||||||
topic: Optional[:class:`str`]
|
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`
|
position: :class:`int`
|
||||||
The position in the channel list. This is a number that starts at 0. e.g. the
|
The position in the channel list. This is a number that starts at 0. e.g. the
|
||||||
top channel is position 0.
|
top channel is position 0.
|
||||||
|
@ -28,7 +28,7 @@ import colorsys
|
|||||||
|
|
||||||
class Colour:
|
class Colour:
|
||||||
"""Represents a Discord role colour. This class is similar
|
"""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.
|
There is an alias for this called Color.
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class Guild(Hashable):
|
|||||||
afk_timeout: :class:`int`
|
afk_timeout: :class:`int`
|
||||||
The timeout to get sent to the AFK channel.
|
The timeout to get sent to the AFK channel.
|
||||||
afk_channel: Optional[:class:`VoiceChannel`]
|
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`]
|
icon: Optional[:class:`str`]
|
||||||
The guild's icon.
|
The guild's icon.
|
||||||
id: :class:`int`
|
id: :class:`int`
|
||||||
@ -98,7 +98,7 @@ class Guild(Hashable):
|
|||||||
unavailable: :class:`bool`
|
unavailable: :class:`bool`
|
||||||
Indicates if the guild is unavailable. If this is ``True`` then the
|
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
|
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.
|
Check the :func:`on_guild_unavailable` and :func:`on_guild_available` events.
|
||||||
max_presences: Optional[:class:`int`]
|
max_presences: Optional[:class:`int`]
|
||||||
|
@ -156,7 +156,7 @@ class PartialInviteGuild:
|
|||||||
return self.icon_url_as()
|
return self.icon_url_as()
|
||||||
|
|
||||||
def is_icon_animated(self):
|
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
|
.. versionadded:: 1.4
|
||||||
"""
|
"""
|
||||||
|
@ -60,7 +60,7 @@ class VoiceState:
|
|||||||
afk: :class:`bool`
|
afk: :class:`bool`
|
||||||
Indicates if the user is currently in the AFK channel in the guild.
|
Indicates if the user is currently in the AFK channel in the guild.
|
||||||
channel: Optional[:class:`VoiceChannel`]
|
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.
|
is not currently in a voice channel.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ class Member(discord.abc.Messageable, _BaseUser):
|
|||||||
@property
|
@property
|
||||||
def activity(self):
|
def activity(self):
|
||||||
"""Union[:class:`BaseActivity`, :class:`Spotify`]: Returns the primary
|
"""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::
|
.. note::
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ class Permissions(BaseFlags):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def all(cls):
|
def all(cls):
|
||||||
"""A factory method that creates a :class:`Permissions` with all
|
"""A factory method that creates a :class:`Permissions` with all
|
||||||
permissions set to True."""
|
permissions set to ``True``."""
|
||||||
return cls(0b01111111111111111111111111111111)
|
return cls(0b01111111111111111111111111111111)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -55,7 +55,7 @@ class Template:
|
|||||||
|
|
||||||
Attributes
|
Attributes
|
||||||
-----------
|
-----------
|
||||||
code: :code:`str`
|
code: :class:`str`
|
||||||
The template code.
|
The template code.
|
||||||
uses: :class:`int`
|
uses: :class:`int`
|
||||||
How many time the template has been used.
|
How many time the template has been used.
|
||||||
|
@ -303,7 +303,7 @@ class ClientUser(BaseUser):
|
|||||||
discriminator: :class:`str`
|
discriminator: :class:`str`
|
||||||
The user's discriminator. This is given when the username has conflicts.
|
The user's discriminator. This is given when the username has conflicts.
|
||||||
avatar: Optional[:class:`str`]
|
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`
|
bot: :class:`bool`
|
||||||
Specifies if the user is a bot account.
|
Specifies if the user is a bot account.
|
||||||
system: :class:`bool`
|
system: :class:`bool`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user