messages.sendBotRequestedPeer
Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button.
func (c *Client) MessagesSendBotRequestedPeer(ctx context.Context, request *MessagesSendBotRequestedPeerRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesSendBotRequestedPeer(ctx, &tg.MessagesSendBotRequestedPeerRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The bot that sent the keyboardButtonRequestPeer button. |
MsgID | int | — | ID of the message that contained the reply keyboard with the keyboardButtonRequestPeer button. |
WebappReqID | string | — | WebappReqID field of MessagesSendBotRequestedPeerRequest. |
ButtonID | int | yes | The button_id field from the keyboardButtonRequestPeer constructor. |
RequestedPeers | []InputPeerClass | yes | The chosen peers. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.sendBotRequestedPeer#6c5cf2a7