messages.SendWebViewData

class pyrogram.raw.functions.messages.SendWebViewData

Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it.

Details:
  • Layer: 227

  • ID: DC0242C8

Parameters:
  • bot (InputUser) – Bot that owns the web app

  • random_id (int 64-bit) – Unique client message ID to prevent duplicate sending of the same event

  • button_text (str) – Text of the keyboardButtonSimpleWebView that was pressed to open the web app.

  • data (str) – Data to relay to the bot, obtained from a web_app_data_send JS event.

Returns:

Updates

TL Schema

messages.sendWebViewData#dc0242c8
bot:InputUser
random_id:long
button_text:string
data:string

= Updates

Parameter Tree

SendWebViewData
├── bot → InputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
├── random_id → long
├── button_text → string
└── data → string

Example

await app.invoke(
    SendWebViewData(
        bot=await app.resolve_user(chat_id),
        random_id=app.rnd_id(),
        button_text="text",
        data="text",
    )
)