diff options
| author | Rapptz <[email protected]> | 2017-05-13 18:48:14 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-05-13 18:48:14 -0400 |
| commit | f73eb087c99a0ee73b9a46500225464ab866c625 (patch) | |
| tree | c08643f1aa5add45d95f934422b1fc8fd35b1b33 /discord/channel.py | |
| parent | Add Colour.blurple and Colour.greyple. (diff) | |
| download | discord.py-f73eb087c99a0ee73b9a46500225464ab866c625.tar.xz discord.py-f73eb087c99a0ee73b9a46500225464ab866c625.zip | |
Use describe instead of tables for supported operations.
Diffstat (limited to 'discord/channel.py')
| -rw-r--r-- | discord/channel.py | 108 |
1 files changed, 58 insertions, 50 deletions
diff --git a/discord/channel.py b/discord/channel.py index 4391b847..bf017545 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -44,19 +44,21 @@ def _single_delete_strategy(messages, *, reason): class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): """Represents a Discord guild text channel. - Supported Operations: - - +-----------+---------------------------------------+ - | Operation | Description | - +===========+=======================================+ - | x == y | Checks if two channels are equal. | - +-----------+---------------------------------------+ - | x != y | Checks if two channels are not equal. | - +-----------+---------------------------------------+ - | hash(x) | Returns the channel's hash. | - +-----------+---------------------------------------+ - | str(x) | Returns the channel's name. | - +-----------+---------------------------------------+ + .. describe:: x == y + + Checks if two channels are equal. + + .. describe:: x != y + + Checks if two channels are not equal. + + .. describe:: hash(x) + + Returns the channel's hash. + + .. describe:: str(x) + + Returns the channel's name. Attributes ----------- @@ -300,19 +302,21 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable): """Represents a Discord guild voice channel. - Supported Operations: + .. describe:: x == y + + Checks if two channels are equal. + + .. describe:: x != y + + Checks if two channels are not equal. + + .. describe:: hash(x) + + Returns the channel's hash. + + .. describe:: str(x) - +-----------+---------------------------------------+ - | Operation | Description | - +===========+=======================================+ - | x == y | Checks if two channels are equal. | - +-----------+---------------------------------------+ - | x != y | Checks if two channels are not equal. | - +-----------+---------------------------------------+ - | hash(x) | Returns the channel's hash. | - +-----------+---------------------------------------+ - | str(x) | Returns the channel's name. | - +-----------+---------------------------------------+ + Returns the channel's name. Attributes ----------- @@ -410,19 +414,21 @@ class VoiceChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable): class DMChannel(discord.abc.Messageable, Hashable): """Represents a Discord direct message channel. - Supported Operations: + .. describe:: x == y - +-----------+-------------------------------------------------+ - | Operation | Description | - +===========+=================================================+ - | x == y | Checks if two channels are equal. | - +-----------+-------------------------------------------------+ - | x != y | Checks if two channels are not equal. | - +-----------+-------------------------------------------------+ - | hash(x) | Returns the channel's hash. | - +-----------+-------------------------------------------------+ - | str(x) | Returns a string representation of the channel | - +-----------+-------------------------------------------------+ + Checks if two channels are equal. + + .. describe:: x != y + + Checks if two channels are not equal. + + .. describe:: hash(x) + + Returns the channel's hash. + + .. describe:: str(x) + + Returns a string representation of the channel Attributes ---------- @@ -489,19 +495,21 @@ class DMChannel(discord.abc.Messageable, Hashable): class GroupChannel(discord.abc.Messageable, Hashable): """Represents a Discord group channel. - Supported Operations: - - +-----------+-------------------------------------------------+ - | Operation | Description | - +===========+=================================================+ - | x == y | Checks if two channels are equal. | - +-----------+-------------------------------------------------+ - | x != y | Checks if two channels are not equal. | - +-----------+-------------------------------------------------+ - | hash(x) | Returns the channel's hash. | - +-----------+-------------------------------------------------+ - | str(x) | Returns a string representation of the channel | - +-----------+-------------------------------------------------+ + .. describe:: x == y + + Checks if two channels are equal. + + .. describe:: x != y + + Checks if two channels are not equal. + + .. describe:: hash(x) + + Returns the channel's hash. + + .. describe:: str(x) + + Returns a string representation of the channel Attributes ---------- |