问题
I'm currently using python-telegram-bot and basically what I want to achieve with it is to send telegram messages like this:
So the message consists of 2+ photos/videos with text message underneath.
What I've already tried:
sending message with send_message method, and including photo URLs, but it only shows 1 picture which is under the text
sending media group using send_media_group, but this method has no
caption
parameter as send_photo.
回答1:
You should use sendMediaGroup, where you can specify media
field with an array of photo/video objects but the trick is to set caption
property only for the first element of an array. In this case telegram will show that caption below the media content.
If you'll specify captions for more than one element telegram will show them only when you click on photo preview for each photo separately.
来源:https://stackoverflow.com/questions/58893142/how-to-send-telegram-mediagroup-with-caption-text