Layer 220
constructor

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
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 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

AttachMenuBot

Gogram Example

// Creating AttachMenuBot constructor
obj := &tg.AttachMenuBot{
    BotId: int64(0),
    ShortName: "...",
    Icons: []tg.AttachMenuBotIcon{&tg.AttachMenuBotIcon{}},

    // Optional fields:
    // Inactive: true,
    // HasSettings: true,
    // RequestWriteAccess: true,
    // ShowInAttachMenu: true,
    // ... more optional fields
}