Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

events.Raw(UpdateBotInlineSend) works after 1

Open johnwallet opened this issue 2 weeks ago • 0 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

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

johnwallet avatar Jun 18 '24 15:06 johnwallet