Answer the question
In order to leave comments, you need to log in
How to send multiple photos using sendMediaGroup method in Telegram?
Good morning everyone! I can't figure out how to send multiple photos in one message. Help guys.
There is a class that __init__
has a variable in the constructor self.multiPhoto = []
. In the method, I fill this variable like this:
for img in item['attachments']:
self.multiPhoto.append(img['photo']['sizes'][-1]['url'])
media = json.dumps({'type':'photo','media':self.multiPhoto,'caption':self.text})
self.telegram.send_media_group(self.chanel,media)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question