Skip to main content

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​

NameTypeRequiredDescription
PeerInputPeerClassyesThe bot that sent the keyboardButtonRequestPeer button.
MsgIDint—ID of the message that contained the reply keyboard with the keyboardButtonRequestPeer button.
WebappReqIDstring—WebappReqID field of MessagesSendBotRequestedPeerRequest.
ButtonIDintyesThe button_id field from the keyboardButtonRequestPeer constructor.
RequestedPeers[]InputPeerClassyesThe chosen peers.

Returns​

UpdatesClass

Possible errors​

CodeTypeDescription
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.

References​