MadelineProto/docs/TD_docs/constructors/keyboardButton.md

46 lines
911 B
Markdown
Raw Normal View History

---
title: keyboardButton
description: Represents one button of the bot keyboard
---
## Constructor: keyboardButton
[Back to constructors index](index.md)
Represents one button of the bot keyboard
### Attributes:
| Name | Type | Required | Description |
|----------|:-------------:|:--------:|------------:|
|text|[string](../types/string.md) | Yes|Text of the button|
|type|[KeyboardButtonType](../types/KeyboardButtonType.md) | Yes|Type of the button|
### Type: [KeyboardButton](../types/KeyboardButton.md)
### Example:
```
2017-07-23 16:33:46 +02:00
$keyboardButton = ['_' => 'keyboardButton', 'text' => 'string', 'type' => KeyboardButtonType];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2017-07-23 16:33:46 +02:00
{"_": "keyboardButton", "text": "string", "type": KeyboardButtonType}
2017-07-23 16:11:02 +02:00
```
Or, if you're into Lua:
```
2017-07-23 16:33:46 +02:00
keyboardButton={_='keyboardButton', text='string', type=KeyboardButtonType}
```