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

import locales

student_router = DefaultRouter()


@student_router.registrar.with_decorator(
    EventTypeFilter(BotEventType.MESSAGE_NEW.value),
    PayloadContainsFilter("student"),
)
async def student_menu(event: BotEvent):
    sevent = SimpleBotEvent(event)
    return await sevent.answer(
        message=locales.ST_MENU,
        keyboard=locales.ST_KB.get_keyboard(),
    )