Add int() support to Hashable, making it available across the board for AuditLogEntry, *Channel, Guild, Object, Message, ...
This commit is contained in:
@ -43,5 +43,8 @@ class EqualityComparable:
|
||||
class Hashable(EqualityComparable):
|
||||
__slots__ = ()
|
||||
|
||||
def __int__(self) -> int:
|
||||
return self.id
|
||||
|
||||
def __hash__(self) -> int:
|
||||
return self.id >> 22
|
||||
|
Reference in New Issue
Block a user