How can i simulate the click of an inline keyboard button?
Good day. I have same problem, but can no resolve it.
Bot send message with button to user.
I need to press this button. For example - @vote bot. http://i.prntscr.com/Dap3xt1TSHSvb0e3oCRvUA.jpeg
Message - https://pastebin.com/Zs4vAVpn
Nothing interesting in message, no one info. Only in buttons i see something -
keyboardButtonRow (ID: 0x77608b83) = (buttons=[\'(keyboardButtonCallback (ID: 0x683a5e46) = (text=Yes – 1, data=b\\'{"id":"a6a0e25","i":0}\\'))\']))',
'(keyboardButtonRow (ID: 0x77608b83) = (buttons=[\'(keyboardButtonCallback (ID: 0x683a5e46) = (text=No, data=b\\'{"id":"a6a0e25","i":1}\\'))\']))'])),
How i can understand - i need to send data - data=b\\'{"id":"a6a0e25","i":1}\\' for vote "No".
But i can understand how to do this... The best for me - is example. But link to man is fine too.
Thank you!
@barsrb maybe @seby2000 can help, I don't know how he solved it.
no i don't :(
no i don't :(
Why did you close the issue if you hadn't solved it…?
https://lonamiwebs.github.io/Telethon/methods/messages/get_bot_callback_answer.html
It works with inline buttons
Thank you @Iriskin0, I guess I'll open a wiki page about it.
working example:
request = GetBotCallbackAnswerRequest(peer, data['msg_id'], data='inline_button_data'.encode())
result = client(request)
Most helpful comment
Thank you @Iriskin0, I guess I'll open a wiki page about it.