peyk.platforms.bale.types.keyboard_button¶
Classes
|
One button of the reply keyboard. |
- class peyk.platforms.bale.types.keyboard_button.KeyboardButton(text: str, request_contact: bool | None = None, request_location: bool | None = None, web_app: WebAppInfo | None = None)[source]¶
Bases:
objectOne button of the reply keyboard.
- text: str¶
- request_contact: bool | None = None¶
- request_location: bool | None = None¶
- web_app: WebAppInfo | None = None¶
- classmethod from_dict(data: dict | None) → KeyboardButton | None[source]¶
Parse raw Bale data into
KeyboardButton.- Parameters:
data (Optional[dict]) – Raw API object or
None.- Returns:
Parsed object or
None.- Return type:
Optional[KeyboardButton]
- Raises:
KeyError – If a required raw field is missing.