From 21bf460b28b22cc7bee0bd666c54d20b7f7a60b9 Mon Sep 17 00:00:00 2001 From: Profitroll <47523801+profitrollgame@users.noreply.github.com> Date: Sat, 7 Jan 2023 00:38:35 +0100 Subject: [PATCH] Fixes + improved logging --- classes/holo_user.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/classes/holo_user.py b/classes/holo_user.py index 6613618..bce31e9 100644 --- a/classes/holo_user.py +++ b/classes/holo_user.py @@ -124,11 +124,11 @@ class HoloUser(): # Check if any text available and log message sending if text is not None: - logWrite(f"{context.from_user.id} sent message '{text}' to {self.id}") + logWrite(f"{context.from_user.id} sent message '{text}' to {self.id} (source message: {context.id})") elif caption is not None: - logWrite(f"{context.from_user.id} sent message '{caption}' to {self.id}") + logWrite(f"{context.from_user.id} sent message '{caption}' to {self.id} (source message: {context.id})") else: - logWrite(f"{context.from_user.id} sent message to {self.id}") + logWrite(f"{context.from_user.id} sent message to {self.id} (source message: {context.id})") # Add notices for admin or user if text is not None: @@ -165,7 +165,7 @@ class HoloUser(): elif file is not None: if isinstance(file, Document): file = file.file_id - new_message = await origin.reply_document(file, caption=caption, quote=True) + new_message = await origin.reply_cached_media(file, caption=caption, quote=True) elif animation is not None: if isinstance(animation, Animation): animation = animation.file_id @@ -190,7 +190,7 @@ class HoloUser(): elif file is not None: if isinstance(file, Document): file = file.file_id - new_message = await app.send_document(self.id, file, caption=caption) + new_message = await app.send_cached_media(self.id, file, caption=caption) elif animation is not None: if isinstance(animation, Animation): animation = animation.file_id