diff --git a/megadl/modules/mega_dl.py b/megadl/modules/mega_dl.py index 4af33e80..95957db6 100644 --- a/megadl/modules/mega_dl.py +++ b/megadl/modules/mega_dl.py @@ -8,7 +8,6 @@ from os import path, makedirs from pyrogram import filters -from pyrogram.enums import ChatType from pyrogram.types import ( Message, CallbackQuery, diff --git a/megadl/modules/mega_up.py b/megadl/modules/mega_up.py index f92f3611..fecd46a1 100644 --- a/megadl/modules/mega_up.py +++ b/megadl/modules/mega_up.py @@ -55,7 +55,6 @@ async def to_up_cb(client: CypherClient, query: CallbackQuery): qmid = query.message.id qcid = query.message.chat.id qusr = query.from_user.id - msg = await client.get_messages(qcid, _mid) # weird workaround to add support for private mode conf = None @@ -68,6 +67,8 @@ async def to_up_cb(client: CypherClient, query: CallbackQuery): if udoc: conf = f"--username {client.cipher.decrypt(udoc['email']).decode()} --password {client.cipher.decrypt(udoc['password']).decode()}" + # Get message + msg = await client.get_messages(qcid, _mid) strtim = time() # Status msg await query.edit_message_text("`Trying to download the file 📥`", reply_markup=None)