From bcaf80e2e158b90ae193997a5a17ea357789e066 Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Sat, 7 Jan 2023 00:38:53 +0100 Subject: [PATCH] Fixed reply_document() issue --- modules/commands/start.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/commands/start.py b/modules/commands/start.py index ac7e6df..55d42ab 100644 --- a/modules/commands/start.py +++ b/modules/commands/start.py @@ -33,13 +33,13 @@ async def cmd_start(app: Client, msg: Message): try: spoiler = col_spoilers.find_one( {"_id": ObjectId(msg.command[1])} ) if spoiler["photo"] is not None: - await msg.reply_document(spoiler["photo"], caption=spoiler["caption"]) + await msg.reply_cached_media(spoiler["photo"], caption=spoiler["caption"]) if spoiler["video"] is not None: await msg.reply_cached_media(spoiler["video"], caption=spoiler["caption"]) if spoiler["animation"] is not None: await msg.reply_cached_media(spoiler["animation"], caption=spoiler["caption"]) if spoiler["document"] is not None: - await msg.reply_document(spoiler["document"], caption=spoiler["caption"]) + await msg.reply_cached_media(spoiler["document"], caption=spoiler["caption"]) if spoiler["text"] is not None: await msg.reply_text(spoiler["text"]) except InvalidId: