mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-07 12:18:59 +00:00
Make supported operations stand out more than attributes.
This commit is contained in:
parent
3727618b65
commit
f4e01b3a92
@ -44,6 +44,8 @@ def _single_delete_strategy(messages, *, reason):
|
||||
class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
"""Represents a Discord guild text channel.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two channels are equal.
|
||||
@ -302,6 +304,8 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
|
||||
class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
|
||||
"""Represents a Discord guild voice channel.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two channels are equal.
|
||||
@ -414,6 +418,8 @@ class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
|
||||
class DMChannel(discord.abc.Messageable, Hashable):
|
||||
"""Represents a Discord direct message channel.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two channels are equal.
|
||||
@ -495,6 +501,8 @@ class DMChannel(discord.abc.Messageable, Hashable):
|
||||
class GroupChannel(discord.abc.Messageable, Hashable):
|
||||
"""Represents a Discord group channel.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two channels are equal.
|
||||
|
@ -30,6 +30,8 @@ class Colour:
|
||||
|
||||
There is an alias for this called Color.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two colours are equal.
|
||||
|
@ -38,6 +38,8 @@ class Emoji(Hashable):
|
||||
Depending on the way this object was created, some of the attributes can
|
||||
have a value of ``None``.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two emoji are the same.
|
||||
|
@ -27,6 +27,8 @@ DEALINGS IN THE SOFTWARE.
|
||||
class Game:
|
||||
"""Represents a Discord game.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two games are equal.
|
||||
|
@ -50,6 +50,8 @@ class Guild(Hashable):
|
||||
|
||||
This is referred to as a "server" in the official Discord UI.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two guilds are equal.
|
||||
|
@ -36,6 +36,8 @@ class Invite(Hashable):
|
||||
Depending on the way this object was created, some of the attributes can
|
||||
have a value of ``None``.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two invites are equal.
|
||||
|
@ -114,6 +114,8 @@ class Member(discord.abc.Messageable, _BaseUser):
|
||||
|
||||
This implements a lot of the functionality of :class:`User`.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two members are equal.
|
||||
|
@ -32,6 +32,8 @@ class Reaction:
|
||||
Depending on the way this object was created, some of the attributes can
|
||||
have a value of ``None``.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two reactions are equal. This works by checking if the emoji
|
||||
|
@ -35,6 +35,8 @@ from .utils import snowflake_time
|
||||
class Role(Hashable):
|
||||
"""Represents a Discord role in a :class:`Guild`.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two roles are equal.
|
||||
|
@ -177,6 +177,8 @@ class BaseUser(_BaseUser):
|
||||
class ClientUser(BaseUser):
|
||||
"""Represents your Discord user.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two users are equal.
|
||||
@ -386,6 +388,8 @@ class ClientUser(BaseUser):
|
||||
class User(BaseUser, discord.abc.Messageable):
|
||||
"""Represents a Discord user.
|
||||
|
||||
.. container:: operations
|
||||
|
||||
.. describe:: x == y
|
||||
|
||||
Checks if two users are equal.
|
||||
|
14
docs/_static/style.css
vendored
14
docs/_static/style.css
vendored
@ -351,6 +351,20 @@ dl.exception > dt {
|
||||
padding: 1px 10px;
|
||||
}
|
||||
|
||||
.container.operations {
|
||||
background-color: #fcfcfc;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.container.operations::before {
|
||||
content: 'Supported Operations';
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.container.operations > dl.describe > dt {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
table.docutils {
|
||||
width: 100%;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user