Answer the question
In order to leave comments, you need to log in
How to find out if a person is online in telgram?
I need to find out if a person is online in a telegram.
Tried like this
from pyrogram import Client, filters
app = Client("my_account") with app:
print(app.get_users("айди"))
{
"_": "User",
"id": айди,
"is_self": false,
"is_contact": true,
"is_mutual_contact": false,
"is_deleted": false,
"is_bot": false,
"is_verified": false,
"is_restricted": false,
"is_scam": false,
"is_support": false,
"first_name": "имя",
"status": "recently",
"username": "юзернейм",
"dc_id": 2,
"phone_number": "************",
"photo": {
"_": "ChatPhoto",
"small_file_id": "айди фото",
"big_file_id": "айди фото"
}
}
Answer the question
In order to leave comments, you need to log in
> "status": "recently",
Reading docs .
status (str, optional) – User's Last Seen & Online status. Can be one of the following: “ online ”, user is online right now. offline , user is currently offline. “ recently ”, user with hidden last seen time who was online between 1 second and 2-3 days ago. “ within_week ”, user with hidden last seen time who was online between 2-3 and seven days ago. “ within_month ”, user with hidden last seen time who was online between 6-7 days and a month ago. long_time_ago , blocked user or user with hidden last seen time who was online more than a month ago. None , for bots.
The user in the privacy settings can select the options for showing the latest activity:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question