telegram bot, callback query of an inline button in a group chat, redirect the user to private chat of bot. python -
my bot sends messages groups inline button, want, when button clicked, chat bot page should open, i.e. somehow redirect user private chat bot.
i'm using this wrapper.
what have tried far set url in answer_callback method, equal url of bot i.e. url="https://t.me/my_sample_bot keep getting url_invalid response telegram, tried http(since read somewhere in api documentation urls should http), did not work either.
my question doing right? mean have set url in answer_callback method redirect user, or should try way?
well figured out myself, setting url right way it, , though wrappers documentation not detailed, took @ source code , there docstring method answer_callback_query said url:
:param url: (optional) url opened user's client. if have created game , accepted conditions via @botfather, specify url opens game – note work if query comes callback_game button. otherwise, may use links telegram.me/your_bot?start=xxxx open bot parameter.
so had give link of bot, start query
Comments
Post a Comment