get the original message the message containing inline button replied to?
reply_msg = await (await event.get_message()).get_reply_message()
Thanks This should have worked but it seems telethon can't delete pyrogram messages
which part failed, show the errors. and what's the relation with pyrogram and message deleting
Oh this await rep_event.delete() File "/usr/local/lib/python3.11/site-packages/telethon/client/users.py", line 79, in _call raise MultiError(exceptions, results, requests) File "/usr/local/lib/python3.11/site-packages/telethon/client/users.py", line 69, in _call result = await f ^^^^^^^ telethon.errors.rpcerrorlist.MessageDeleteForbiddenError: You can't delete one of the messages you tried to delete, most likely because it is a service message. (caused by DeleteMessagesRequest)
On second thought that's not it running eval still on the message and trying to delete it using the bot itself still works
Server has too many fucky restriction for message deletion, can't tell without proper info which is the cause, you'll find more info in botapi docs https://core.telegram.org/bots/api#deletemessage
Thanks I've found the issue It was a special case I guess The message I tested with was a channel forward message and it seems that can't be deleted I guess?
pretty much every message is deletable in a private chat, as long as it meets the time restrictions. depending on the load of the bot (the situation lately) that's also not true for some situation. it's not because of forward thing
i got it,thank you very much for your enthusiastic answer.
Обсуждают сегодня