i have a small problem and hope you’ll help me.
i wanted to do small automatization in bot. there is what it shoult do:
- go to the chat with bot(no problems here)
- send “/start” to bot to get message with inline button(still no problems here)
- click on inline button(there is problem)
i used events messages
await client.send_message(bot_username, '/start')
print('Sent /start to bot')
# awaiting bot reply
@client.on(events.NewMessage(from_users=bot_username))
async def handler(event):
print('Received message from bot')
if 'Launch Blum' in event.message.message: #if button found click on it
await event.message.click(0)
client.remove_event_handler(handler)
await client.run_until_disconnected()
i tried remove checking if “Launch Blum” in event, and just click in button. But its not work too.
btw, this button should open web app.
New contributor
user576372 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.