This repository has been archived on 2025-09-07. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
MouseyBot/Mousey/Bot/Handlers/Admin/menu.py

43 lines
1.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from aiogram.utils.i18n import gettext as _
from aiogram.types import Message, CallbackQuery
from Mousey.Bot.Keyboards import (
get_admin_menu_markup,
get_back_markup,
)
#################
### Сообщения ###
#################
async def cmd_admin_menu(message: Message) -> None:
"""
Вызов меню для администрации командой.
"""
await message.answer(
text=_("Админ меню"),
reply_markup=get_admin_menu_markup(),
)
#############
### Вызовы ###
#############
async def call_admin_menu(call: CallbackQuery) -> None:
"""
Вызов меню для администрации с помощью Callback'а.
"""
await call.message.edit_text(
text=_("Админ меню"),
reply_markup=get_admin_menu_markup(),
)
async def call_admin_commands(call: CallbackQuery) -> None:
"""
Просмотр команд для администратора.
"""
await call.message.edit_text(
text=_("Список админ команд"),
reply_markup=get_back_markup(callback_data="admin_menu"),
)