From a43873109c46c3d24b39ecd9d11fa8fa24893a3d Mon Sep 17 00:00:00 2001 From: Factorino73 Date: Tue, 31 Dec 2024 00:36:08 +0400 Subject: [PATCH] fix: fix GigaChatClient class name in main and change import paths --- main.py | 16 ++++++++-------- src/bot/telegram_userbot.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) 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: