Link Search Menu Expand Document

Method: bots.setBotMenuButton

Back to methods index

Sets the menu button action » for a given user or for all users


user_idUsername, chat ID, Update, Message or InputUserUser IDOptional
buttonBotMenuButtonBot menu button actionYes

Return type: Bool

Can bots use this method: YES

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$Bool = $MadelineProto->bots->setBotMenuButton(user_id: $InputUser, button: $BotMenuButton, );