domovoy_bot/keyboards/reply.py

41 lines
1.3 KiB
Python

"""
Reply-клавиатуры (кнопки под строкой ввода)
"""
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
from aiogram.utils.keyboard import ReplyKeyboardBuilder
def get_reply_menu() -> ReplyKeyboardMarkup:
"""
Reply-меню для жильцов
Используется редко, в основном для важных действий
"""
builder = ReplyKeyboardBuilder()
builder.row(
KeyboardButton(text='📞 Важные телефоны'),
KeyboardButton(text='👷 Мастера'),
)
builder.row(
KeyboardButton(text='❓ Справка'),
)
# Resize keyboard чтобы не занимал много места
return builder.as_markup(resize_keyboard=True, one_time_keyboard=False)
def get_admin_reply_menu() -> ReplyKeyboardMarkup:
"""Reply-меню для админа"""
builder = ReplyKeyboardBuilder()
builder.row(
KeyboardButton(text='⚙️ Управление'),
KeyboardButton(text='📊 Статистика'),
)
builder.row(
KeyboardButton(text='🛡️ Фильтр посторонних'),
KeyboardButton(text='📥 Выгрузка базы'),
)
return builder.as_markup(resize_keyboard=True)