Layer 227
AttachMenuBotObj
Represents a bot mini app that can be launched from the attachment/side menu
constructor
attachMenuBot#d90d8dfe flags:# inactive:flags.0?true has_settings:flags.1?true request_write_access:flags.2?true show_in_attach_menu:flags.3?true show_in_side_menu:flags.4?true side_menu_disclaimer_needed:flags.5?true bot_id:long short_name:string peer_types:flags.3?Vector<AttachMenuPeerType> icons:Vector<AttachMenuBotIcon> = AttachMenuBot;
Parameters
| Name | Type | Description |
|---|---|---|
| Inactive | flags .0? true | 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. toggle Bot In Attach Menu the app should be opened. |
| HasSettings | flags .1? true | Deprecated flag, can be ignored. |
| RequestWriteAccess | flags .2? true | Whether the bot would like to send messages to the user. |
| ShowInAttachMenu | flags .3? true | Whether, when installed, an attachment menu entry should be shown for the Mini App. |
| ShowInSideMenu | flags .4? true | Whether, when installed, an entry in the main view side menu should be shown for the Mini App. |
| SideMenuDisclaimerNeeded | flags .5? true | 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. |
| BotId | long | Bot ID |
| ShortName | string | Attachment menu item name |
| PeerTypes | flags .3? Vector < AttachMenuPeerType > | List of dialog types where this attachment menu entry should be shown |
| Icons | Vector < AttachMenuBotIcon > | List of platform-specific static icons and animations to use for the attachment menu button |
Returns
AttachMenuBotGogram Example
// Creating AttachMenuBotObj constructor obj := &tg.AttachMenuBotObj{ Inactive: nil, HasSettings: nil, RequestWriteAccess: nil, ShowInAttachMenu: nil, ShowInSideMenu: nil, SideMenuDisclaimerNeeded: nil, // ... more required fields }