Added config and current commands, Close button for inline menus, pass to all __init__s
This commit is contained in:
6
bot/handlers/config/__init__.py
Normal file
6
bot/handlers/config/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from bot.common import dp
|
||||
from .config_command import *
|
||||
|
||||
|
||||
def register():
|
||||
dp.register_message_handler(config_command, commands='config')
|
||||
11
bot/handlers/config/config_command.py
Normal file
11
bot/handlers/config/config_command.py
Normal 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))
|
||||
Reference in New Issue
Block a user