messages.StartBot

class pyrogram.raw.functions.messages.StartBot

Start a conversation with a bot using a deep linking parameter

Details:
  • Layer: 223

  • ID: E6DF7378

Parameters:
  • bot (InputUser) – The bot

  • peer (InputPeer) – The chat where to start the bot, can be the bot’s private chat or a group

  • random_id (int 64-bit) – Random ID to avoid resending the same message

  • start_param (str) – Deep linking parameter

Returns:

Updates

TL Schema

messages.startBot#e6df7378
bot:InputUser
peer:InputPeer
random_id:long
start_param:string

= Updates

Parameter Tree

StartBot
├── botInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── random_idlong
└── start_paramstring

Example

await app.invoke(
    StartBot(
        bot=await app.resolve_user(chat_id),
        peer=await app.resolve_peer(chat_id),
        random_id=app.rnd_id(),
        start_param="text",
    )
)