From a40e20fa38801b3867614b533297efc658dfae7a Mon Sep 17 00:00:00 2001 From: PythonCoderAS <13932583+PythonCoderAS@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:46:08 -0400 Subject: [PATCH] Use Hashable mixin for Message --- discord/message.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/discord/message.py b/discord/message.py index 4ba2a826c..8c3d9c781 100644 --- a/discord/message.py +++ b/discord/message.py @@ -42,6 +42,7 @@ from .flags import MessageFlags from .file import File from .utils import escape_mentions from .guild import Guild +from .mixins import Hashable class Attachment: @@ -252,7 +253,7 @@ def flatten_handlers(cls): return cls @flatten_handlers -class Message: +class Message(Hashable): r"""Represents a message from Discord. There should be no need to create one of these manually. @@ -388,9 +389,6 @@ 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]