send_bot_requested_peer()

async Client.send_bot_requested_peer()

Send a peer chosen by the user via a KeyboardButtonRequestPeer button.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – The chat containing the button.

  • message_id (int) – The message ID with the button.

  • button_id (int) – The button ID.

  • requested_peers (List of InputPeer) – The peers chosen by the user.

  • webapp_req_id (int, optional) – Web app request ID.

Returns:

Updates – The updates object.

Example

await app.send_bot_requested_peer(chat_id, message_id, button_id=1, requested_peers=[peer])