5

I'm writing a telegram bot now and I have a question. As I know any user can link to a bot using "@" symbol, like this @my_bot. Is there any possibility to make such a link, that when a user click on it, not only he is redirected to this bot, but also a specific command is sent to this bot by a user automatically. Something like this @my_bot/my_command. I've tried this link, but it doesn't work. I don't know, if it is possible, maybe you do. Thanks in advance!

barmirbar
  • 93
  • 1
  • 3

1 Answers1

6

You can use a deep link adding an additional parameter

https://t.me/mybot?start=task_name

The deep link opens the bot with the start command, the additional parameter is passed to your handler to customise what the start command_handler should do.

Beppe C
  • 11,256
  • 2
  • 19
  • 41