Layer 220
InputKeyboardButtonRequestPeer
Prompts the user to select and share one or more peers with the bot using messages. send Bot Requested Peer.
constructor
inputKeyboardButtonRequestPeer#c9662d05 flags:# name_requested:flags.0?true username_requested:flags.1?true photo_requested:flags.2?true text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| NameRequested | flags.0?true | Set this flag to request the peer's name. |
| UsernameRequested | flags.1?true | Set this flag to request the peer's @username (if any). |
| PhotoRequested | flags.2?true | Set this flag to request the peer's photo (if any). |
| Text | string | Button text |
| ButtonId | int | Button ID, to be passed to messages. send Bot Requested Peer. |
| PeerType | RequestPeerType | Filtering criteria to use for the peer selection list shown to the user. The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity ) peers of the specified type, if needed. |
| MaxQuantity | int | Maximum number of peers that can be chosen. |
Returns
KeyboardButtonGogram Example
// Creating InputKeyboardButtonRequestPeer constructor obj := &tg.InputKeyboardButtonRequestPeer{ Text: "...", ButtonId: 0, PeerType: &tg.RequestPeerType{}, MaxQuantity: 0, // Optional fields: // NameRequested: true, // UsernameRequested: true, // PhotoRequested: true, }