mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Hashable TelegramObject
This commit is contained in:
parent
f3f9b3c27a
commit
531b2a4df7
14 changed files with 54 additions and 50 deletions
|
|
@ -78,10 +78,7 @@ class User(base.TelegramObject):
|
|||
return await self.bot.get_user_profile_photos(self.id, offset, limit)
|
||||
|
||||
def __hash__(self):
|
||||
return self.id + \
|
||||
hash(self.is_bot) + \
|
||||
hash(self.full_name) + \
|
||||
(hash(self.username) if self.username else 0)
|
||||
return self.id
|
||||
|
||||
def __int__(self):
|
||||
return self.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue