messages.toggleBotInAttachMenu

Enable or disable web bot attachment menu »

 Method schema is available as of layer 151. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
write_allowed flags.0?true Whether the user authorizes the bot to write messages to them, if requested by attachMenuBot.request_write_access
bot InputUser Bot ID
enabled Bool Toggle

Result

Bool

Possible errors

Code Type Description
400 BOT_INVALID This is not a valid bot.

Related pages

attachMenuBot

Represents a bot mini app that can be launched from the attachment/side menu »

At least one of the show_in_attach_menu or the show_in_side_menu flags will always be set.

Bot attachment menu and side menu entries

Bots can install attachment menu and side menu entries, offering conveniently accessible, versatile web apps.