Search code examples
pythonpython-3.xbotstelegramtelethon

Send post from @PostBot using Telethon


Good afternoon, I want to know how to send this action from Telethon?

Image

(Send post, click here to send post)

I tried to just send a message, but nothing comes out, only what I wrote is sent(@PostBot ...)


Solution

  • Solved!

    send_entity = await client.get_entity("USERNAME")
    query = await client.inline_query("@PostBot", "62ed0f7189df3")
    result = await query[0].click(send_entity)