telegram api method · layer 229 · #4504d54f

bots.setBotMenuButton

usable by bots

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

definition

bots.setBotMenuButton#4504d54f user_id:InputUser button:BotMenuButton = Bool;

parameters

nametypedescription
user_idInputUserUser ID
buttonBotMenuButtonBot menu button action

returns

Bool

errors (6)

codeerrordescription
400BUSINESS_CONNECTION_NOT_ALLOWEDThis method was invoked over a business connection using invokeWithBusinessConnection, but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.
400BUTTON_INVALIDThe specified button is invalid.
400BUTTON_TEXT_INVALIDThe specified button text is invalid.
400BUTTON_URL_INVALIDButton URL invalid.
400USER_BOT_REQUIREDThis method can only be called by a bot.
401AUTH_KEY_UNREGISTEREDThe specified authorization key is not registered in the system (for example, a PFS temporary key has expired).

history

present in layers 140–229

idlayers
#4504d54f140–229