16 lines
465 B
Python
16 lines
465 B
Python
from telebot import TeleBot
|
|
|
|
from .handlers import register_handlers
|
|
from .config import BotConfig
|
|
|
|
|
|
def get_bot(config: BotConfig, state_storage):
|
|
bot = TeleBot(config.token,
|
|
parse_mode=config.parse_mode,
|
|
skip_pending=config.skip_pending,
|
|
num_threads=config.num_threads,
|
|
use_class_middlewares=True,
|
|
state_storage=state_storage)
|
|
register_handlers(bot)
|
|
return bot
|