diff --git a/main.py b/main.py index a85b07f..3960f3a 100644 --- a/main.py +++ b/main.py @@ -1,4 +1,4 @@ -from integrations.gigachat_api_client import GigaChatManager +from src.integrations.gigachat_api_client import GigaChatClient from src.bot.telegram_userbot import TelegramUserBot from src.core.configuration import config @@ -8,19 +8,19 @@ def main() -> None: Entry point for starting the Telegram user bot. """ # Load API credentials and configuration - api_id = config.API_ID - api_hash = config.API_HASH - api_token = config.API_GIGACHAT_TOKEN + api_id: str = config.API_ID + api_hash: str = config.API_HASH + api_token: str = config.API_GIGACHAT_TOKEN - # Initialize GigaChatManager - gigachat_manager = GigaChatManager(api_token=api_token) + # Initialize GigaChatClient + gigachat_client: GigaChatClient = GigaChatClient(api_token=api_token) # Initialize and run the Telegram user bot - bot = TelegramUserBot( + bot: TelegramUserBot = TelegramUserBot( session_name="userbot", api_id=api_id, api_hash=api_hash, - gigachat_manager=gigachat_manager + gigachat_client=gigachat_client ) bot.run() diff --git a/src/bot/telegram_userbot.py b/src/bot/telegram_userbot.py index 109198e..9ba16b7 100644 --- a/src/bot/telegram_userbot.py +++ b/src/bot/telegram_userbot.py @@ -5,7 +5,7 @@ from pyrogram.client import Client from pyrogram.types import Message from pyrogram.enums import ChatAction -from integrations.gigachat_api_client import GigaChatClient +from src.integrations.gigachat_api_client import GigaChatClient class TelegramUserBot: