diff --git a/userbot/__init__.py b/userbot/__init__.py index aa85b5d94..e96e094c2 100644 --- a/userbot/__init__.py +++ b/userbot/__init__.py @@ -67,7 +67,6 @@ PM_AUTO_BAN = sb(os.environ.get("PM_AUTO_BAN", "False")) # Heroku Credentials for updater. -HEROKU_MEMEZ = sb(os.environ.get("HEROKU_MEMEZ", "False")) HEROKU_APPNAME = os.environ.get("HEROKU_APPNAME", None) HEROKU_APIKEY = os.environ.get("HEROKU_APIKEY", None) @@ -158,10 +157,10 @@ # 'bot' variable if STRING_SESSION: # pylint: disable=invalid-name - bot = TelegramClient(StringSession(STRING_SESSION), API_KEY, API_HASH) + bot = TelegramClient(StringSession(STRING_SESSION), API_KEY, API_HASH, auto_reconnect=False, lang_code='en') else: # pylint: disable=invalid-name - bot = TelegramClient("userbot", API_KEY, API_HASH) + bot = TelegramClient("userbot", API_KEY, API_HASH, auto_reconnect=False, lang_code='en') async def check_botlog_chatid(): @@ -204,4 +203,4 @@ async def check_botlog_chatid(): LASTMSG = {} CMD_HELP = {} ISAFK = False -AFKREASON = None +AFKREASON = None \ No newline at end of file diff --git a/userbot/__main__.py b/userbot/__main__.py index 3248b6fd3..19ec4f2fb 100644 --- a/userbot/__main__.py +++ b/userbot/__main__.py @@ -30,13 +30,12 @@ LOGS.info("You are running Paperplane Extended [v5.0]") LOGS.info( - "Congratulations, your userbot is now running !! Test it by typing .alive in any chat." - "If you need assistance, head to https://t.me/PaperplaneExtendedChat") + "Congratulations, your userbot is now running !!" + "Test it by typing .alive in any chat.") if len(argv) not in (1, 3, 4): bot.disconnect() else: bot.loop.run_until_complete(bot.disconnected) - if bot.reconnect: - args = [sys.executable, "-m", "userbot"] - os.execle(sys.executable, *args, os.environ) + args = [sys.executable, "-m", "userbot"] + os.execle(sys.executable, *args, os.environ) \ No newline at end of file diff --git a/userbot/modules/gdrive.py b/userbot/modules/gdrive.py index 51015b93f..5b674f01b 100644 --- a/userbot/modules/gdrive.py +++ b/userbot/modules/gdrive.py @@ -9,9 +9,9 @@ import time from pySmartDL import SmartDL from telethon import events -from apiclient.discovery import build -from apiclient.http import MediaFileUpload -from apiclient.errors import ResumableUploadError +from googleapiclient.discovery import build +from googleapiclient.http import MediaFileUpload +from googleapiclient.errors import ResumableUploadError from oauth2client.client import OAuth2WebServerFlow from oauth2client.file import Storage from oauth2client import file, client, tools @@ -454,4 +454,4 @@ async def gdrive_search(http, search_query): \nUsage: Looks for files and folders in your Google Drive.\ \n\n.ggd \ \nUsage: Uploads all the files in the directory to a folder in Google Drive." -}) +}) \ No newline at end of file