Added ability to export accounts to json

This commit is contained in:
2022-11-01 09:46:09 +03:00
parent 373623b0b4
commit dbf27d401e
5 changed files with 170 additions and 61 deletions

View File

@ -3,9 +3,9 @@ import functools
import mariadb
import telebot
from . import handlers
from . import handlers, utils
__all__ = ["handlers"]
__all__ = ["handlers", "utils"]
def create_bot(token: str, engine: mariadb.Connection) -> telebot.TeleBot:
@ -40,4 +40,7 @@ def create_bot(token: str, engine: mariadb.Connection) -> telebot.TeleBot:
bot.register_message_handler(
functools.partial(handlers.cancel, bot), commands=["cancel"]
)
bot.register_message_handler(
functools.partial(handlers.export, bot, engine), commands=["export"]
)
return bot