4

How can I check is user online or not, if I have users chat Id? I tryed bot.userStatus(myChat); but this is wrong.

wowkin2
  • 5,895
  • 5
  • 23
  • 66
Mikita Melnikau
  • 1,655
  • 2
  • 15
  • 30
  • https://stackoverflow.com/questions/38131042/getting-the-users-last-seen-from-a-telegram-bot/48506509#48506509 – Qualcomm Mar 09 '21 at 18:20
  • @Qualcomm that's an answer but this question should not be considered as "duplicate". – Istorn Jan 13 '22 at 13:23

1 Answers1

0

Telegram Bot APIs don't offer any methods or object's attribute in order to get the user status, whether if he's online or not.

Your chatbot is able to gather user's information as soon as he wrote a message to the chatbot: these informations are the User's object fields as described into the Telegram Bot API documentation.

According to the available fields, user status (online, offline, etc.) unfortunately is not (yet) available.

According to another question posted here, it seems that getting the user status is possible via Telegram API so that creating a Telegram registered application which is not the same thing of using a Telegram Bot.

Istorn
  • 485
  • 1
  • 5
  • 23