mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Remove "bot" property from UserStatus
This commit is contained in:
parent
69c1532eae
commit
c9ce188bbe
@ -130,6 +130,9 @@ def parse_chat_photo(photo):
|
||||
|
||||
|
||||
def parse_last_seen(user: types.User) -> pyrogram_types.UserStatus:
|
||||
if user.bot:
|
||||
return None
|
||||
|
||||
status = user.status
|
||||
last_seen = pyrogram_types.UserStatus()
|
||||
|
||||
@ -145,8 +148,6 @@ def parse_last_seen(user: types.User) -> pyrogram_types.UserStatus:
|
||||
last_seen.within_week = True
|
||||
elif isinstance(status, types.UserStatusLastMonth):
|
||||
last_seen.within_month = True
|
||||
elif user.bot:
|
||||
last_seen.bot = True
|
||||
else:
|
||||
last_seen.long_time_ago = True
|
||||
|
||||
|
@ -33,7 +33,6 @@ class UserStatus(Object):
|
||||
within_week: bool = None,
|
||||
within_month: bool = None,
|
||||
long_time_ago: bool = None,
|
||||
bot: bool = None,
|
||||
date: int = None,
|
||||
):
|
||||
self.online = online
|
||||
@ -42,5 +41,4 @@ class UserStatus(Object):
|
||||
self.within_week = within_week
|
||||
self.within_month = within_month
|
||||
self.long_time_ago = long_time_ago
|
||||
self.bot = bot
|
||||
self.date = date
|
||||
|
Loading…
x
Reference in New Issue
Block a user