Skip to main content

payments.toggleStarGiftsPinnedToTop

Pins a received gift on top of the profile of the user or owned channels by using payments.toggleStarGiftsPinnedToTop.

func (c *Client) PaymentsToggleStarGiftsPinnedToTop(ctx context.Context, request *PaymentsToggleStarGiftsPinnedToTopRequest) (bool, error)

Calling this method​

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsToggleStarGiftsPinnedToTop(ctx, &tg.PaymentsToggleStarGiftsPinnedToTopRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters​

NameTypeRequiredDescription
PeerInputPeerClassyesThe peer where to pin the gift.
Stargift[]InputSavedStarGiftClassyesThe gift to pin.

Returns​

bool

Possible errors​

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References​