Changed requirements-check procedure

This commit is contained in:
Profitroll 2022-08-09 12:31:11 +02:00
parent a29fd26046
commit 91a65d9b49

View File

@ -6,7 +6,6 @@ import sys
from threading import Thread from threading import Thread
import time import time
import traceback import traceback
import schedule
from modules.logging import logWrite from modules.logging import logWrite
from modules.utils import configGet, jsonLoad, jsonSave from modules.utils import configGet, jsonLoad, jsonSave
@ -57,10 +56,11 @@ if "--norun" in sys.argv:
sys.exit() sys.exit()
try: try:
import schedule # type: ignore
from pyrogram import Client, filters, idle # type: ignore from pyrogram import Client, filters, idle # type: ignore
from pyrogram.types import ChatPermissions, ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton, BotCommand, BotCommandScopeChat # type: ignore from pyrogram.types import ChatPermissions, ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton, BotCommand, BotCommandScopeChat # type: ignore
except ModuleNotFoundError: except ModuleNotFoundError:
print(f"Module pyrogram is not installed. Run 'pip3 install -r requirements.txt' and restart the program.", flush=True) print(f"Required modules are not installed. Run 'pip3 install -r requirements.txt' and restart the program.", flush=True)
sys.exit() sys.exit()
app = Client("duptsiaposter", bot_token=configGet("bot_token", "bot"), api_id=configGet("api_id", "bot"), api_hash=configGet("api_hash", "bot")) app = Client("duptsiaposter", bot_token=configGet("bot_token", "bot"), api_id=configGet("api_id", "bot"), api_hash=configGet("api_hash", "bot"))