fix: fix GigaChatClient class name in main and change import paths
This commit is contained in:
parent
e734b9d827
commit
a43873109c
16
main.py
16
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.bot.telegram_userbot import TelegramUserBot
|
||||||
from src.core.configuration import config
|
from src.core.configuration import config
|
||||||
|
|
||||||
@ -8,19 +8,19 @@ def main() -> None:
|
|||||||
Entry point for starting the Telegram user bot.
|
Entry point for starting the Telegram user bot.
|
||||||
"""
|
"""
|
||||||
# Load API credentials and configuration
|
# Load API credentials and configuration
|
||||||
api_id = config.API_ID
|
api_id: str = config.API_ID
|
||||||
api_hash = config.API_HASH
|
api_hash: str = config.API_HASH
|
||||||
api_token = config.API_GIGACHAT_TOKEN
|
api_token: str = config.API_GIGACHAT_TOKEN
|
||||||
|
|
||||||
# Initialize GigaChatManager
|
# Initialize GigaChatClient
|
||||||
gigachat_manager = GigaChatManager(api_token=api_token)
|
gigachat_client: GigaChatClient = GigaChatClient(api_token=api_token)
|
||||||
|
|
||||||
# Initialize and run the Telegram user bot
|
# Initialize and run the Telegram user bot
|
||||||
bot = TelegramUserBot(
|
bot: TelegramUserBot = TelegramUserBot(
|
||||||
session_name="userbot",
|
session_name="userbot",
|
||||||
api_id=api_id,
|
api_id=api_id,
|
||||||
api_hash=api_hash,
|
api_hash=api_hash,
|
||||||
gigachat_manager=gigachat_manager
|
gigachat_client=gigachat_client
|
||||||
)
|
)
|
||||||
bot.run()
|
bot.run()
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ from pyrogram.client import Client
|
|||||||
from pyrogram.types import Message
|
from pyrogram.types import Message
|
||||||
from pyrogram.enums import ChatAction
|
from pyrogram.enums import ChatAction
|
||||||
|
|
||||||
from integrations.gigachat_api_client import GigaChatClient
|
from src.integrations.gigachat_api_client import GigaChatClient
|
||||||
|
|
||||||
|
|
||||||
class TelegramUserBot:
|
class TelegramUserBot:
|
||||||
|
Loading…
Reference in New Issue
Block a user