Changed requirements-check procedure
This commit is contained in:
parent
a29fd26046
commit
91a65d9b49
4
main.py
4
main.py
@ -6,7 +6,6 @@ import sys
|
||||
from threading import Thread
|
||||
import time
|
||||
import traceback
|
||||
import schedule
|
||||
|
||||
from modules.logging import logWrite
|
||||
from modules.utils import configGet, jsonLoad, jsonSave
|
||||
@ -57,10 +56,11 @@ if "--norun" in sys.argv:
|
||||
sys.exit()
|
||||
|
||||
try:
|
||||
import schedule # type: ignore
|
||||
from pyrogram import Client, filters, idle # type: ignore
|
||||
from pyrogram.types import ChatPermissions, ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton, BotCommand, BotCommandScopeChat # type: ignore
|
||||
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()
|
||||
|
||||
app = Client("duptsiaposter", bot_token=configGet("bot_token", "bot"), api_id=configGet("api_id", "bot"), api_hash=configGet("api_hash", "bot"))
|
||||
|
Reference in New Issue
Block a user