mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-06 03:47:29 +00:00
Fix comparisons between two Object with types
This commit is contained in:
parent
61eddfcb18
commit
56916f9241
@ -102,7 +102,7 @@ class Object(Hashable):
|
||||
return f'<Object id={self.id!r} type={self.type!r}>'
|
||||
|
||||
def __eq__(self, other: object) -> bool:
|
||||
if isinstance(other, self.type):
|
||||
if isinstance(other, (self.type, self.__class__)):
|
||||
return self.id == other.id
|
||||
return NotImplemented
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user