2024-05-01 14:53:46 +02:00

2.9 KiB

title description nav_exclude image
attachMenuBot Represents a bot mini app that can be launched from the attachment/side menu » true https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: attachMenuBot

Back to constructors index

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.

Attributes:

Name Type Required Description
inactive Bool Optional If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking messages.toggleBotInAttachMenu the app should be opened.
has_settings Bool Optional Deprecated flag, can be ignored.
request_write_access Bool Optional Whether the bot would like to send messages to the user.
show_in_attach_menu Bool Optional Whether, when installed, an attachment menu entry should be shown for the Mini App.
show_in_side_menu Bool Optional Whether, when installed, an entry in the main view side menu should be shown for the Mini App.
side_menu_disclaimer_needed Bool Optional If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown.
bot_id long Yes Bot ID
short_name string Yes Attachment menu item name
peer_types Array of AttachMenuPeerType Optional List of dialog types where this attachment menu entry should be shown
icons Array of AttachMenuBotIcon Yes List of platform-specific static icons and animations to use for the attachment menu button

Type: AttachMenuBot

Example:

$attachMenuBot = ['_' => 'attachMenuBot', 'inactive' => Bool, 'has_settings' => Bool, 'request_write_access' => Bool, 'show_in_attach_menu' => Bool, 'show_in_side_menu' => Bool, 'side_menu_disclaimer_needed' => Bool, 'bot_id' => long, 'short_name' => 'string', 'peer_types' => [AttachMenuPeerType, AttachMenuPeerType], 'icons' => [AttachMenuBotIcon, AttachMenuBotIcon]];