4

How can a bot send a message to the user, when user just opens the chat.

Example:

  1. User has already added a Telegram bot to his list of contacts and started conversation
  2. Later on, user opens the chat window with that bot
  3. Bot "sees" that user has opened the chat window, but hasn't written anything yet
  4. Bot should say "hello, what can I help you with?" to the user

Is there any event/trigger for a step #3 in Telegram Bot API?

Ronnie
  • 8,053
  • 6
  • 34
  • 34
KateButenko
  • 506
  • 5
  • 8

1 Answers1

4

No. There is no trigger for each time user opens the chat window but for the first time as below:

When someone opens a chat with bot "FOR THE FIRST TIME", automatically Telegram sends /start command to bot .It is like an ordinary command when user sends a command or write /start and send, so your bot can catch it and say hello or do any commands to that user. As soon as user opens the chat window with your bot, Telegrams send this message automatically to your bot containing info about user and so on.

Seyfi
  • 1,832
  • 1
  • 20
  • 35
  • thanks, but that's why I wrote first point - User has already added bot and started conversation. There is also bot's description that is being sent on the first opening the chat. I'm looking for every chat opening.... – KateButenko Aug 08 '16 at 17:08
  • @KateButenko But Telgram does not provide this function yet. – Seyfi Aug 08 '16 at 17:16