From 0f359ade0f7265df44b6fd017143d49946f0aefa Mon Sep 17 00:00:00 2001 From: 5hojib Date: Wed, 8 Jan 2025 20:27:32 +0600 Subject: [PATCH] load config first of all --- bot/__main__.py | 8 +++++--- bot/helper/telegram_helper/bot_commands.py | 7 +------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/bot/__main__.py b/bot/__main__.py index ad12ef467..fc2de9b78 100644 --- a/bot/__main__.py +++ b/bot/__main__.py @@ -5,9 +5,13 @@ from pyrogram.handlers import CallbackQueryHandler from pyrogram.types import BotCommand +from .core.config_manager import Config + +# Initialize Configurations +Config.load() + from . import LOGGER, bot_loop from .core.aeon_client import TgClient -from .core.config_manager import Config from .core.handlers import add_handlers from .core.startup import ( load_configurations, @@ -35,8 +39,6 @@ restart_notification, ) -# Initialize Configurations -Config.load() # Commands and Descriptions COMMANDS = { diff --git a/bot/helper/telegram_helper/bot_commands.py b/bot/helper/telegram_helper/bot_commands.py index 10244383f..12bd62bb6 100644 --- a/bot/helper/telegram_helper/bot_commands.py +++ b/bot/helper/telegram_helper/bot_commands.py @@ -1,11 +1,6 @@ from bot.core.config_manager import Config - -def get_cmd_suffix(): - return Config.CMD_SUFFIX - - -i = get_cmd_suffix() +i = Config.CMD_SUFFIX class _BotCommands: