Skip to content

Use editMessageMedia to keep daily announcements updated #111

Description

@nmlorg

https://core.telegram.org/bots/api#october-31-2024:

  • Introduced the ability to add media to existing text messages using the method editMessageMedia.
  • Can you remove media?
  • What happens if the length of the text is greater than the caption limit?
  • Can you still use editMessageText to change the text, or do you have to use editMessageCaption after adding an image?
  • If you sendMessage(text='a' * 2000), then editMessageMedia to add a picture, does it fail, does it change to a message with caption='a' * 2000, does it change to a message with caption='a' * 1024, or what?
  • If it changes to caption='a' * 2000, can you editMessageCaption(caption='b' * 2000)? Can you edit it at all, or is it stuck? Can you remove the image, edit the text, then readd the image?

Depending on how this turns out, I'd like to start sending all announcements as text messages, immediately editing them to add media (if appropriate), and also keeping media updated (including removing it) as event titles/etc. change.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions