15 lines
290 B
Python
15 lines
290 B
Python
import logging
|
|
|
|
import pydantic
|
|
from aiogram import Bot
|
|
|
|
|
|
class TelegramConfig(pydantic.BaseModel):
|
|
TOKEN: str
|
|
|
|
|
|
class TelegramBase:
|
|
def __init__(self, config: TelegramConfig) -> None:
|
|
self.bot: Bot = Bot(token=config.TOKEN)
|
|
logging.info('Telegram bot initialized')
|