Skip to content

Commit

Permalink
renamed ilistner to use_listner
Browse files Browse the repository at this point in the history
  • Loading branch information
Itz-fork committed Dec 26, 2023
1 parent 25857df commit 19e692d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions megadl/helpers/mclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self):

# other stuff
print("> Setting up additional functions")
self.add_handler(MessageHandler(self.ilistner))
self.add_handler(MessageHandler(self.use_listner))
self.tasks = {}

print("--------------------")
Expand All @@ -90,7 +90,6 @@ def handle_checks(self, func: Callable) -> Callable:
"""

async def fn_run(client: Client, msg: Message):
print("oo")
try:
# db functions
if self.database:
Expand Down Expand Up @@ -127,7 +126,7 @@ async def ask(self, chat_id: int, text: str, *args, **kwargs):
self.tasks.pop(chat_id, None)
return None

async def ilistner(self, _, msg: Message):
async def use_listner(self, _, msg: Message):
lstn = self.tasks.get(msg.chat.id)
if lstn and not lstn["task"].done():
print(msg.text)
Expand Down
2 changes: 1 addition & 1 deletion megadl/lib/aiomongo.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from os import getenv
from typing import Any, Optional, Sequence, Type, Union
from typing import Any
from bson.codec_options import TypeRegistry
from pymongo.collection import Collection
from pymongo.mongo_client import MongoClient
Expand Down
1 change: 1 addition & 0 deletions megadl/modules/mega_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ async def dl_from_cb(client: MeganzClient, query: CallbackQuery):
"Your download is starting 📥...", reply_markup=None
)

# weird workaround to add support for private mode
conf = None
if client.is_public:
udoc = await client.database.is_there(qcid)
Expand Down
1 change: 1 addition & 0 deletions megadl/modules/mega_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ async def to_up_cb(client: MeganzClient, query: CallbackQuery):
dl_path = await dl.download(msg.text, client.dl_loc, client, (qcid, qmid))

# Upload the file
# weird workaround to add support for private mode
conf = None
if client.is_public:
udoc = await client.database.is_there(qcid)
Expand Down

0 comments on commit 19e692d

Please sign in to comment.