Keyboard¶
-
class
pyrubrum.
Keyboard
(inline_keyboard: List[List[pyrubrum.keyboard.button.Button]], handler: BaseHandler, callback_query_id: str, chat_id: int)¶ Simple shortcut for calling
BaseHandler.process_keyboard
and storing the processed keyboard in the same object.It is useful since it automatically processes the content of buttons and, at the same time, behaves like a normal
InlineKeyboardMarkup
instance.- Parameters
inline_keyboard (List[List[Button]]) – The keyboard which is going to be converted.
handler (BaseHandler) – The handler from which the function
BaseHandler.process_function
is going to be called.callback_query_id (str) – The unique identifier of the query, which will be used to make the call that is made by the inline buttons unique.
chat_id (int) – The identifier of the chat from which the query has been sent.