LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!

Home Page:https://docs.telethon.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

events.Raw(UpdateBotInlineSend) works after 1

johnwallet opened this issue · comments

Code that causes the issue

@bot.on(events.Raw(UpdateBotInlineSend))
async def inlinequery_callback(event):
    await bot(EditInlineBotMessageRequest(
        id=event.msg_id,
        message='text',
        no_webpage=True,
        media=None,
        reply_markup=None,
        entities=None
    ))

Expected behavior

It should work every time.

Actual behavior

It works after 1 time. 1 - works, 2 - does not work, 3 - works, and so on..
It turns out to receive an event every time the session closes.

Traceback

No response

Telethon version

1.36.0

Python version

3.12.2

Operating system (including distribution name and version)

Windows 10

Other details

No response

Checklist

  • The error is in the library's code, and not in my own.
  • I have searched for this issue before posting it and there isn't an open duplicate.
  • I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.

Will there be any comments here?

I have not had the time or urgency to look into this. If it's important to you, feel welcome to investigate and send a PR.

Though I'm fairly sure this update is special and configured in BotFather. It does not have pts or qts like the rest. Meaning, if Telegram doesn't send it, Telethon can't recover or fetch it.