Telethon: simulate inline button click

Created on 4 Jun 2017  Â·  8Comments  Â·  Source: LonamiWebs/Telethon

How can i simulate the click of an inline keyboard button?

RTFM

Most helpful comment

Thank you @Iriskin0, I guess I'll open a wiki page about it.

All 8 comments

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…?

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)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

pazis picture pazis  Â·  5Comments

amir3code picture amir3code  Â·  6Comments

ksanderer picture ksanderer  Â·  3Comments

rbabaee2014 picture rbabaee2014  Â·  3Comments

iranpak picture iranpak  Â·  3Comments