0

I am trying to send one or more documents on telegram which are available in url via pyrogram.

Looking in the documentation, I discovered that there is a reply_media_group method, but when I use it, I always get the error pyrogram.errors.exceptions.bad_request_400.MediaInvalid: Telegram says: [400 MEDIA_INVALID] - The media is invalid (caused by " messages.UploadMedia")

I tried using the command below, but it only works when it comes to files on my computer, even though the module allows the use of url, and it manages to send the documents if you do it separately

    await message.reply_media_group([
        InputMediaDocument('https://pbs.twimg.com/media/FgGQ8p9XgAYOU-c?format=jpg&name=4096x4096'),
        InputMediaDocument('https://pbs.twimg.com/media/Ffbx1jMXoAEU7Fh?format=jpg&name=medium'),
    ])
tavo
  • 54
  • 4

0 Answers0