I'm developing a Telegram bot that will send a text message, and then after a while will change it by adding an image to it. I use Pyrogram, here's the small snippet:
@app.on_message(filters.command(["start"]))
async def start(client, message):
test_message = await message.reply_text("Hello World")
await test_message.edit_media(
InputMediaPhoto(media="./img/1.png")
)
But it throws an error:
pyrogram.errors.exceptions.bad_request_400.MessageEmpty: Telegram says: [400 MESSAGE_EMPTY] - The message sent is empty or contains invalid characters (caused by "messages.EditMessage")
Any help is greatly appreciated
UPD: I found out that it's impossible to add a picture to existing text-only message, but is there a workaround?