From 34b64c00c333ca3c8163773a6f75181a1f625b5d Mon Sep 17 00:00:00 2001 From: Hafitz Setya Date: Sat, 10 Jul 2021 05:20:22 +0700 Subject: [PATCH] Add user in status --- bot/helper/ext_utils/bot_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/helper/ext_utils/bot_utils.py b/bot/helper/ext_utils/bot_utils.py index f3e3a13..f992f4e 100644 --- a/bot/helper/ext_utils/bot_utils.py +++ b/bot/helper/ext_utils/bot_utils.py @@ -116,6 +116,11 @@ def get_readable_message(): f" | Peers: {download.aria_download().connections}" except: pass + if download.message.from_user.username: + uname = f'@{download.message.from_user.username}' + else: + uname = f'{download.message.from_user.first_name}' + msg += f'\nUser: {uname} ({download.message.from_user.id})' if download.status() == MirrorStatus.STATUS_DOWNLOADING: msg += f"\nTo Stop: /{BotCommands.CancelMirror} {download.gid()}" msg += "\n\n"