aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-12-11 00:30:26 -0500
committerRapptz <[email protected]>2020-12-11 00:32:38 -0500
commitebf623d9de2f5a45629f3754bf62f5e4bd861aeb (patch)
tree7d3878a74cf560cfc0646a53fa7e07520d97941a
parentAdd PartialMessage to allow working with channel/message_id pairs. (diff)
downloaddiscord.py-ebf623d9de2f5a45629f3754bf62f5e4bd861aeb.tar.xz
discord.py-ebf623d9de2f5a45629f3754bf62f5e4bd861aeb.zip
Add operations you can do to a Message and PartialMessage to docs
-rw-r--r--discord/message.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/discord/message.py b/discord/message.py
index 82b959ac..bb37b4cd 100644
--- a/discord/message.py
+++ b/discord/message.py
@@ -367,7 +367,19 @@ def flatten_handlers(cls):
class Message(Hashable):
r"""Represents a message from Discord.
- There should be no need to create one of these manually.
+ .. container:: operations
+
+ .. describe:: x == y
+
+ Checks if two messages are equal.
+
+ .. describe:: x != y
+
+ Checks if two messages are not equal.
+
+ .. describe:: hash(x)
+
+ Returns the message's hash.
Attributes
-----------
@@ -1312,6 +1324,20 @@ class PartialMessage(Hashable):
.. versionadded:: 1.6
+ .. container:: operations
+
+ .. describe:: x == y
+
+ Checks if two partial messages are equal.
+
+ .. describe:: x != y
+
+ Checks if two partial messages are not equal.
+
+ .. describe:: hash(x)
+
+ Returns the partial message's hash.
+
Attributes
-----------
channel: :class:`TextChannel`