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!
Link to a telegram bot with pre-written command
Asked Answered
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.
Ok^ thank you, and is it possible to make it running any other command? –
Estellaestelle
It looks like the start command is the only option when deep linking core.telegram.org/bots#deep-linking –
Hardihood
@BeppeC according to the mentioned docs, there is also a "startgroup" parameter for deep linking. –
Savdeep
Current docs URL is core.telegram.org/api/links#bot-links –
Oleic
Not working if telergam is running in background –
Alexandro
© 2022 - 2024 — McMap. All rights reserved.