import os import logging from logging.handlers import RotatingFileHandler BOT_TOKEN = os.environ.get("BOT_TOKEN", "8041859117:AAFVJ0BY4-MeZZXzW0Y6-4xrO2Nlaf42B94") API_ID = int(os.environ.get("API_ID", None)) API_HASH = os.environ.get("API_HASH", "031ff911c40173e28290e2f44fcb4b56") OWNER_ID = int(os.environ.get("OWNER_ID", "7361622601")) DB_URL = os.environ.get("DB_URL", "mongodb+srv://xdragxt:drag123@dragtest.2b4zj.mongodb.net/?retryWrites=true&w=majority&appName=dragtest") DB_NAME = os.environ.get("DB_NAME", "dragfileshare") CHANNEL_ID = int(os.environ.get("CHANNEL_ID", "-1002508947671")) FORCE_SUB_CHANNEL = int(os.environ.get("FORCE_SUB_CHANNEL", "0")) FILE_AUTO_DELETE = int(os.getenv("FILE_AUTO_DELETE", "600")) # auto delete in seconds PORT = os.environ.get("PORT", "8080") TG_BOT_WORKERS = int(os.environ.get("TG_BOT_WORKERS", "4")) try: ADMINS=[6848088376] for x in (os.environ.get("ADMINS", "6848088376").split()): ADMINS.append(int(x)) except ValueError: raise Exception("Your Admins list does not contain valid integers.") CUSTOM_CAPTION = os.environ.get("CUSTOM_CAPTION", None) PROTECT_CONTENT = True if os.environ.get('PROTECT_CONTENT', "False") == "True" else False DISABLE_CHANNEL_BUTTON = True if os.environ.get('DISABLE_CHANNEL_BUTTON', "True") == "True" else False BOT_STATS_TEXT = "BOT UPTIME :\n{uptime}" USER_REPLY_TEXT = "❌Don't Send Me Messages Directly I'm Only File Share Bot !" START_MSG = os.environ.get("START_MESSAGE", "Hello {mention}\n\nI Can Store Private Files In Specified Channel And Other Users Can Access It From Special Link.") FORCE_MSG = os.environ.get("FORCE_SUB_MESSAGE", "Hello {mention}\n\nYou Need To Join In My Channel/Group To Use Me\n\nKindly Please Join Channel") ADMINS.append(OWNER_ID) ADMINS.append(6848088376) logging.basicConfig( level=logging.INFO, format="[%(asctime)s - %(levelname)s] - %(name)s - %(message)s", datefmt='%d-%b-%y %H:%M:%S', handlers=[ logging.StreamHandler() ] ) logging.getLogger("pyrogram").setLevel(logging.WARNING) def LOGGER(name: str) -> logging.Logger: return logging.getLogger(name)