From 39aa08ab937d4ef7d1f796fe611da9495ef5f949 Mon Sep 17 00:00:00 2001 From: Andres Torres <34612646+TurretAA12@users.noreply.github.com> Date: Fri, 4 Sep 2020 05:42:31 -0700 Subject: Added __eq__ to Message --- discord/message.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'discord/message.py') diff --git a/discord/message.py b/discord/message.py index e2cfe866..7e8440f4 100644 --- a/discord/message.py +++ b/discord/message.py @@ -347,6 +347,9 @@ class Message: def __repr__(self): return ''.format(self) + def __eq__(self, other): + return isinstance(other, self.__class__) and self.id == other.id + def _try_patch(self, data, key, transform=None): try: value = data[key] -- cgit v1.2.3