python_study-project/main.py

29 lines
793 B
Python

from src.integrations.gigachat_api_client import GigaChatClient
from src.bot.telegram_userbot import TelegramUserBot
from src.core.configuration import config
def main() -> None:
"""
Entry point for starting the Telegram user bot.
"""
# Load API credentials and configuration
api_id: str = config.API_ID
api_hash: str = config.API_HASH
api_token: str = config.API_GIGACHAT_TOKEN
# Initialize GigaChatClient
gigachat_client: GigaChatClient = GigaChatClient(api_token=api_token)
# Initialize and run the Telegram user bot
bot: TelegramUserBot = TelegramUserBot(
session_name="userbot",
api_id=api_id,
api_hash=api_hash,
gigachat_client=gigachat_client
)
bot.run()
if __name__ == "__main__":
main()