-1

I have a telegram bot and it works correctly. But if you send one more time /start it begins to answer twice the same thing. How can I repair that?

  • it's hard to help you if we can't check the code – 91DarioDev Sep 29 '17 at 17:50
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. You should post your code if you want some help... – dot.Py Sep 29 '17 at 17:50

2 Answers2

0

Except first automatically /start, users can click that blue text or input themselves, there is no way to prevent this.

Sean Wei
  • 7,433
  • 1
  • 19
  • 39
0

If you want to prevent 2nd reply to the /start or to change it slightly you can simply create a record in DB/memcache/somewhere for a user with a flag/counter and check if it's the first attempt.

For example in my bot @DebtsTrackerBot I'm asking user to choose language just on the first /start and safe chosen locale to user profile in DB.

Alexander Trakhimenok
  • 6,019
  • 2
  • 27
  • 52