For Standard Keyboard
$params = [
'keyboard' => '',
'resize_keyboard' => '',
'one_time_keyboard' => '',
'selective' => '',
];
OR
For Inline Keyboard
$params = [
'inline_keyboard' => '',
];
Show file
Open project: irazasyed/telegram-bot-sdk
Class Usage Examples
Property | Type | Description | |
---|---|---|---|
$inline | boolean | Make an Inline Keyboard |
Method | Description | |
---|---|---|
button ( string | array $params = [] ) : mixed | Represents one button of the Reply keyboard. | |
forceReply ( array $params = [] ) : string | Display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply'). | |
hide ( array $params = [] ) : string | Hide the current custom keyboard and display the default letter-keyboard. | |
inline ( ) | Make this keyboard inline, So it appears right next to the message it belongs to. | |
inlineButton ( string | array $params = [] ) : string | Represents one button of an inline keyboard. | |
isInlineKeyboard ( ) : boolean | Determine if it's an inline keyboard. | |
row ( ) | Create a new row in keyboard to add buttons. |
$params = 'string'
OR
$params = [
'text' => '',
'request_contact' => '',
'request_location' => '',
];
$params = [
'force_reply' => true,
'selective' => false,
];
public static forceReply ( array $params = [] ) : string | ||
$params | array | |
return | string |
$params = [
'hide_keyboard' => true,
'selective' => false,
];
public inline ( ) |
$params = [
'text' => '',
'url' => '',
'callback_data' => '',
'switch_inline_query' => '',
];
public isInlineKeyboard ( ) : boolean | ||
return | boolean |