From 2a14e4898c627c909b4101cf4d7cc8e8f2512c3f Mon Sep 17 00:00:00 2001 From: mizax Date: Wed, 11 Oct 2023 11:35:18 +0200 Subject: [PATCH] Update pyrogram to version 2.0 --- main.py | 4 ++-- plugins/login.py | 2 +- requirements.txt | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 234b727..0815a48 100644 --- a/main.py +++ b/main.py @@ -27,12 +27,12 @@ USER=Config.USER bot = Client( - "InstaSessibon", + "InstaSession", bot_token=Config.BOT_TOKEN, api_id=Config.API_ID, api_hash=Config.API_HASH, workers=50, - plugins=dict(root="plugins") + plugins=dict(enabled=True, root="plugins", include=['commands', 'callback', 'insta_cmds', 'login', 'text'], exclude=[]) ) diff --git a/plugins/login.py b/plugins/login.py index a7e5c23..34d7f38 100644 --- a/plugins/login.py +++ b/plugins/login.py @@ -81,7 +81,7 @@ async def login(bot, message): return while True: try: - password = await bot.ask(text = f"Helo {USER} Enter your Instagram Password to login into your account 🙈", chat_id = message.from_user.id, filters=filters.text, timeout=30) + password = await bot.ask(text = f"Helo {USER} Enter your Instagram Password to login into your account 🙈", identifier=(message.from_user.id, None, None), filters=filters.text, timeout=30) except TimeoutError: await bot.send_message(message.from_user.id, "Error!!\n\nRequest timed out.\nRestart by using /login") return diff --git a/requirements.txt b/requirements.txt index 95725bc..e15978c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -pyrogram==1.4.15 -tgcrypto +pyrogram==2.0 +tgcrypto==1.2.5 python-dotenv==0.20.0 instaloader pyromod