from vkwave.bots import DefaultRouter, SimpleBotEvent, simple_bot_message_handler, PayloadContainsFilter, BotEvent, \
    EventTypeFilter
from vkwave.types.bot_events import BotEventType

import locales

man_router = DefaultRouter()


@man_router.registrar.with_decorator(
    EventTypeFilter(BotEventType.MESSAGE_NEW.value),
    PayloadContainsFilter("man"),
)
async def man_menu(event: BotEvent):
    sevent = SimpleBotEvent(event)
    return await sevent.answer(
        message=locales.MAN,
        keyboard=locales.MAN_KB.get_keyboard(),
    )