mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-07 17:39:03 +00:00
Fix comparisons between two Object with types
This commit is contained in:
1 parent
61eddfcb18
commit
56916f9241
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user