import json from aiogram import Dispatcher, Bot from aiogram.bot.api import TelegramAPIServer from aiogram.contrib.fsm_storage.memory import MemoryStorage from peewee import SqliteDatabase from playhouse.db_url import connect import config from utils import messages # used, do not delete! # Bot init bot = Bot( token=config.token, server=TelegramAPIServer.from_base(config.telegram_api_server) ) storage = MemoryStorage() dp = Dispatcher( bot=bot, storage=storage ) db: SqliteDatabase = connect(config.db_url) permissions = json.load(open(config.permission_file))