Skip to content

Commit 56916f9

Browse files
committed
Fix comparisons between two Object with types
1 parent 61eddfc commit 56916f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __repr__(self) -> str:
102102
return f'<Object id={self.id!r} type={self.type!r}>'
103103

104104
def __eq__(self, other: object) -> bool:
105-
if isinstance(other, self.type):
105+
if isinstance(other, (self.type, self.__class__)):
106106
return self.id == other.id
107107
return NotImplemented
108108

0 commit comments

Comments
 (0)