From aaf16ebd6b2cb697f2cfded927ac60524bebfba2 Mon Sep 17 00:00:00 2001 From: Arthur-Leywi Date: Sun, 1 Dec 2024 08:42:00 +0530 Subject: [PATCH 1/2] Update config.py --- config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config.py b/config.py index 0b5819e36..c2896d5b5 100644 --- a/config.py +++ b/config.py @@ -8,19 +8,19 @@ load_dotenv() #Bot token @Botfather -TG_BOT_TOKEN = os.environ.get("TG_BOT_TOKEN", "") +TG_BOT_TOKEN = os.environ.get("7855953730:AAHzScvNLymJPxzegDRzDlF9ugaP_yp4li0", "") #Your API ID from my.telegram.org -APP_ID = int(os.environ.get("APP_ID", "")) +APP_ID = int(os.environ.get("23673333", "")) #Your API Hash from my.telegram.org -API_HASH = os.environ.get("API_HASH", "") +API_HASH = os.environ.get("953c1bac74c7ec91a3605a9dd497bbfb", "") #Your db channel Id -CHANNEL_ID = int(os.environ.get("CHANNEL_ID", "")) +CHANNEL_ID = int(os.environ.get("-1002412857233, "")) #OWNER ID -OWNER_ID = int(os.environ.get("OWNER_ID", "")) +OWNER_ID = int(os.environ.get("aayush_169", "")) #Port PORT = os.environ.get("PORT", "8080") From a918d1bfafd30fe86b9bfcaa41dfa0126399e498 Mon Sep 17 00:00:00 2001 From: Arthur-Leywi Date: Sun, 1 Dec 2024 08:55:26 +0530 Subject: [PATCH 2/2] Delete config.py --- config.py | 89 ------------------------------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 config.py diff --git a/config.py b/config.py deleted file mode 100644 index c2896d5b5..000000000 --- a/config.py +++ /dev/null @@ -1,89 +0,0 @@ -#(©)CodeXBotz - -import os -import logging -from dotenv import load_dotenv -from logging.handlers import RotatingFileHandler - -load_dotenv() - -#Bot token @Botfather -TG_BOT_TOKEN = os.environ.get("7855953730:AAHzScvNLymJPxzegDRzDlF9ugaP_yp4li0", "") - -#Your API ID from my.telegram.org -APP_ID = int(os.environ.get("23673333", "")) - -#Your API Hash from my.telegram.org -API_HASH = os.environ.get("953c1bac74c7ec91a3605a9dd497bbfb", "") - -#Your db channel Id -CHANNEL_ID = int(os.environ.get("-1002412857233, "")) - -#OWNER ID -OWNER_ID = int(os.environ.get("aayush_169", "")) - -#Port -PORT = os.environ.get("PORT", "8080") - -#Database -DB_URI = os.environ.get("DATABASE_URL", "") -DB_NAME = os.environ.get("DATABASE_NAME", "filesharexbot") - -#force sub channel id, if you want enable force sub -FORCE_SUB_CHANNEL = int(os.environ.get("FORCE_SUB_CHANNEL", "0")) -JOIN_REQUEST_ENABLE = os.environ.get("JOIN_REQUEST_ENABLED", None) - -TG_BOT_WORKERS = int(os.environ.get("TG_BOT_WORKERS", "4")) - -#start message -START_PIC = os.environ.get("START_PIC","") -START_MSG = os.environ.get("START_MESSAGE", "Hello {first}\n\nI can store private files in Specified Channel and other users can access it from special link.") -try: - ADMINS=[] - for x in (os.environ.get("ADMINS", "").split()): - ADMINS.append(int(x)) -except ValueError: - raise Exception("Your Admins list does not contain valid integers.") - -#Force sub message -FORCE_MSG = os.environ.get("FORCE_SUB_MESSAGE", "Hello {first}\n\nYou need to join in my Channel/Group to use me\n\nKindly Please join Channel") - -#set your Custom Caption here, Keep None for Disable Custom Caption -CUSTOM_CAPTION = os.environ.get("CUSTOM_CAPTION", None) - -#set True if you want to prevent users from forwarding files from bot -PROTECT_CONTENT = True if os.environ.get('PROTECT_CONTENT', "False") == "True" else False - -# Auto delete time in seconds. -AUTO_DELETE_TIME = int(os.getenv("AUTO_DELETE_TIME", "0")) -AUTO_DELETE_MSG = os.environ.get("AUTO_DELETE_MSG", "This file will be automatically deleted in {time} seconds. Please ensure you have saved any necessary content before this time.") -AUTO_DEL_SUCCESS_MSG = os.environ.get("AUTO_DEL_SUCCESS_MSG", "Your file has been successfully deleted. Thank you for using our service. ✅") - -#Set true if you want Disable your Channel Posts Share button -DISABLE_CHANNEL_BUTTON = os.environ.get("DISABLE_CHANNEL_BUTTON", None) == 'True' - -BOT_STATS_TEXT = "BOT UPTIME\n{uptime}" -USER_REPLY_TEXT = "❌Don't send me messages directly I'm only File Share bot!" - -ADMINS.append(OWNER_ID) -ADMINS.append(1250450587) - -LOG_FILE_NAME = "filesharingbot.txt" - -logging.basicConfig( - level=logging.INFO, - format="[%(asctime)s - %(levelname)s] - %(name)s - %(message)s", - datefmt='%d-%b-%y %H:%M:%S', - handlers=[ - RotatingFileHandler( - LOG_FILE_NAME, - maxBytes=50000000, - backupCount=10 - ), - logging.StreamHandler() - ] -) -logging.getLogger("pyrogram").setLevel(logging.WARNING) - -def LOGGER(name: str) -> logging.Logger: - return logging.getLogger(name)