AttachMenuBot

class pyrogram.raw.types.AttachMenuBot

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

Constructor of AttachMenuBot.

Details:
  • Layer: 227

  • ID: D90D8DFE

Parameters:
  • bot_id (int 64-bit) – Bot ID

  • short_name (str) – Attachment menu item name

  • icons (List of AttachMenuBotIcon) – List of platform-specific static icons and animations to use for the attachment menu button

  • 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.

  • peer_types (List of AttachMenuPeerType, optional) – List of dialog types where this attachment menu entry should be shown

TL Schema

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

Parameter Tree

AttachMenuBot
├── inactive → true (optional)
├── has_settings → true (optional)
├── request_write_access → true (optional)
├── show_in_attach_menu → true (optional)
├── show_in_side_menu → true (optional)
├── side_menu_disclaimer_needed → true (optional)
├── bot_id → long
├── short_name → string
├── peer_types → Vector < AttachMenuPeerType > (optional)
│ ├── AttachMenuPeerTypePM
└── icons → Vector < AttachMenuBotIcon >
├── name → string
├── icon → Document
│ ├── DocumentEmpty
│ │ └── id → long
│ └── Document
│ ├── id → long
│ ├── access_hash → long
│ ├── file_reference → bytes
│ ├── date → int
│ ├── mime_type → string
│ ├── size → long
│ ├── thumbs → Vector < PhotoSize > (optional)
│ │ ├── PhotoSizeEmpty
│ │ ├── PhotoSize
│ │ ├── PhotoCachedSize
│ │ ├── PhotoStrippedSize
│ │ ├── PhotoSizeProgressive
│ │ └── PhotoPathSize
│ ├── video_thumbs → Vector < VideoSize > (optional)
│ │ ├── VideoSize
│ │ ├── VideoSizeEmojiMarkup
│ │ └── VideoSizeStickerMarkup
│ ├── dc_id → int
│ └── attributes → Vector < DocumentAttribute >
└── colors → Vector < AttachMenuBotIconColor > (optional)
├── name → string
└── color → int

Example

AttachMenuBot(
    bot_id=0,
    short_name="text",
    icons=[
            AttachMenuBotIcon(
                name="text",
                icon=DocumentEmpty(id=0)
            )
        ],
)