Make supported operations stand out more than attributes.

This commit is contained in:
Rapptz 2017-05-20 02:08:34 -04:00
parent 3727618b65
commit f4e01b3a92
11 changed files with 169 additions and 127 deletions

View File

@ -44,6 +44,8 @@ def _single_delete_strategy(messages, *, reason):
class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable):
"""Represents a Discord guild text channel. """Represents a Discord guild text channel.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two channels are equal. 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): class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable):
"""Represents a Discord guild voice channel. """Represents a Discord guild voice channel.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two channels are equal. 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): class DMChannel(discord.abc.Messageable, Hashable):
"""Represents a Discord direct message channel. """Represents a Discord direct message channel.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two channels are equal. Checks if two channels are equal.
@ -495,6 +501,8 @@ class DMChannel(discord.abc.Messageable, Hashable):
class GroupChannel(discord.abc.Messageable, Hashable): class GroupChannel(discord.abc.Messageable, Hashable):
"""Represents a Discord group channel. """Represents a Discord group channel.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two channels are equal. Checks if two channels are equal.

View File

@ -30,6 +30,8 @@ class Colour:
There is an alias for this called Color. There is an alias for this called Color.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two colours are equal. Checks if two colours are equal.

View File

@ -38,6 +38,8 @@ class Emoji(Hashable):
Depending on the way this object was created, some of the attributes can Depending on the way this object was created, some of the attributes can
have a value of ``None``. have a value of ``None``.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two emoji are the same. Checks if two emoji are the same.

View File

@ -27,6 +27,8 @@ DEALINGS IN THE SOFTWARE.
class Game: class Game:
"""Represents a Discord game. """Represents a Discord game.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two games are equal. Checks if two games are equal.

View File

@ -50,6 +50,8 @@ class Guild(Hashable):
This is referred to as a "server" in the official Discord UI. This is referred to as a "server" in the official Discord UI.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two guilds are equal. Checks if two guilds are equal.

View File

@ -36,6 +36,8 @@ class Invite(Hashable):
Depending on the way this object was created, some of the attributes can Depending on the way this object was created, some of the attributes can
have a value of ``None``. have a value of ``None``.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two invites are equal. Checks if two invites are equal.

View File

@ -114,6 +114,8 @@ class Member(discord.abc.Messageable, _BaseUser):
This implements a lot of the functionality of :class:`User`. This implements a lot of the functionality of :class:`User`.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two members are equal. Checks if two members are equal.

View File

@ -32,6 +32,8 @@ class Reaction:
Depending on the way this object was created, some of the attributes can Depending on the way this object was created, some of the attributes can
have a value of ``None``. have a value of ``None``.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two reactions are equal. This works by checking if the emoji Checks if two reactions are equal. This works by checking if the emoji

View File

@ -35,6 +35,8 @@ from .utils import snowflake_time
class Role(Hashable): class Role(Hashable):
"""Represents a Discord role in a :class:`Guild`. """Represents a Discord role in a :class:`Guild`.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two roles are equal. Checks if two roles are equal.

View File

@ -177,6 +177,8 @@ class BaseUser(_BaseUser):
class ClientUser(BaseUser): class ClientUser(BaseUser):
"""Represents your Discord user. """Represents your Discord user.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two users are equal. Checks if two users are equal.
@ -386,6 +388,8 @@ class ClientUser(BaseUser):
class User(BaseUser, discord.abc.Messageable): class User(BaseUser, discord.abc.Messageable):
"""Represents a Discord user. """Represents a Discord user.
.. container:: operations
.. describe:: x == y .. describe:: x == y
Checks if two users are equal. Checks if two users are equal.

View File

@ -351,6 +351,20 @@ dl.exception > dt {
padding: 1px 10px; 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 { table.docutils {
width: 100%; width: 100%;
} }