Added config and current commands, Close button for inline menus, pass to all __init__s
This commit is contained in:
15
bot/callbacks/common.py
Normal file
15
bot/callbacks/common.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from bot.common import dp
|
||||
from bot.callbacks.factories.common import close_keyboard_data
|
||||
from aiogram import types
|
||||
from bot.utils.private_keyboard import other_user
|
||||
|
||||
|
||||
async def on_close_keyboard(call: types.CallbackQuery):
|
||||
if await other_user(call):
|
||||
return
|
||||
|
||||
await call.message.delete()
|
||||
|
||||
|
||||
def register():
|
||||
dp.register_callback_query_handler(on_close_keyboard, close_keyboard_data.filter())
|
||||
Reference in New Issue
Block a user