Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit a40e20f

Browse files
Use Hashable mixin for Message
1 parent b96ed43 commit a40e20f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

discord/message.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from .file import File
4343
from .utils import escape_mentions
4444
from .guild import Guild
45+
from .mixins import Hashable
4546

4647

4748
class Attachment:
@@ -252,7 +253,7 @@ def flatten_handlers(cls):
252253
return cls
253254

254255
@flatten_handlers
255-
class Message:
256+
class Message(Hashable):
256257
r"""Represents a message from Discord.
257258
258259
There should be no need to create one of these manually.
@@ -388,9 +389,6 @@ def __init__(self, *, state, channel, data):
388389
def __repr__(self):
389390
return '<Message id={0.id} channel={0.channel!r} type={0.type!r} author={0.author!r} flags={0.flags!r}>'.format(self)
390391

391-
def __eq__(self, other):
392-
return isinstance(other, self.__class__) and self.id == other.id
393-
394392
def _try_patch(self, data, key, transform=None):
395393
try:
396394
value = data[key]

0 commit comments

Comments
 (0)