Skip to content

Commit 758b5a9

Browse files
committed
Add __hash__ dunder to PartialUser
1 parent f35e78b commit 758b5a9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

twitchio/user.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ def __eq__(self, other: object) -> bool:
113113

114114
return self.id == other.id
115115

116+
def __hash__(self) -> int:
117+
return hash(self.id)
118+
116119
@property
117120
def mention(self) -> str:
118121
"""Property returning the users display_name formatted to mention them in chat.

0 commit comments

Comments
 (0)