Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

[V2] add inlinecallback to buttoncallback event

Open apepenkov opened this issue 2 years ago • 3 comments

Allow ButtonCallback event to handle UpdateInlineBotCallbackQuery, add chat property to it

apepenkov avatar Nov 11 '23 20:11 apepenkov

Getting message from inline doesn't really work, unless peer is known. Not sure if it should. Needs to be investigated

apepenkov avatar Dec 17 '23 20:12 apepenkov

For the editing of inline messages - there are multiple options what to do with it.

  • leave users to use raw api
  • create separate friendly method for editing it
  • update friendly method edit_message to accept abcs.InputBotInlineMessageId, and call edit_inline_bot_message under the hood
  • create edit_message just for this update type.

My opinion - 2nd or 3rd are the best options. 3rd is better for users, 2nd is better for maitainers - especially since edit_inline_bot_message just returns a bool

apepenkov avatar Dec 17 '23 20:12 apepenkov

Note - message id, that is unpacked from types.InputBotInlineMessageId/types.InputBotInlineMessageId64 (in case of PM or simple chat) is sender's message id, not even bot's.

apepenkov avatar Dec 18 '23 14:12 apepenkov