BaseStyle

class pyrubrum.BaseStyle

Basic representation of a style that can be used in order to create a keyboard for Menu.keyboard.

abstract generate(handler: Handler, client: pyrogram.client.client.Client, context: Any, parameters: Dict[str, Any], menu: Menu) → List[List[Button]]

This abstract method is intended to be implemented as a keyboard generator.

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

pyrogram.InlineKeyboardMarkup