Added config and current commands, Close button for inline menus, pass to all __init__s

This commit is contained in:
BarsTiger
2023-03-08 16:10:22 +02:00
parent ebdd27ece8
commit b83e649349
19 changed files with 119 additions and 5 deletions

View File

@@ -0,0 +1,6 @@
from bot.common import dp
from .config_command import *
def register():
dp.register_message_handler(config_command, commands='config')

View File

@@ -0,0 +1,11 @@
from aiogram import types
from bot.db import db, DBTables
from bot.utils.cooldown import throttle
from bot.utils.errorable_command import wrap_exception
from bot.keyboards.config import get_config_keyboard
@wrap_exception()
@throttle(cooldown=60*60, admin_ids=db[DBTables.config].get('admins'), by_id=False)
async def config_command(message: types.Message):
await message.reply("⚙️ Configuration:", reply_markup=get_config_keyboard(message.from_id))