MenuStyleΒΆ
-
class
pyrubrum.
MenuStyle
(back_text: Optional[str] = 'π', limit: Optional[int] = 2)ΒΆ Provide a standard keyboard with which you can refer to children and parent menus effortlessly.
- Parameters
-
generate
(handler: Handler, client: pyrogram.client.client.Client, context: Any, parameters: Dict[str, Any], menu: Menu) → List[List[Button]]ΒΆ Provide a keyboard, filled with all the buttons which refer to the children menus and a special button for linking the user to the parent menu, if any.
- Parameters
handler (BaseHandler) β The handler which coordinates the management of the menus.
client (Client) β The client which is linked to the handler.
context (Union[CallbackQuery, Message]) β The context for which the button is generated.
parameters (Dict[str, Any]) β The parameters which were passed to the handler.
menu (Menu) β The menu the keyboard is being built for.
- Returns
The generated inline keyboard, which is then displayed to the user.
- Return type