Skip to main content

payments.toggleChatStarGiftNotifications

Enables or disables the reception of notifications every time a gift » is received by the specified channel, can only be invoked by admins with post_messages admin rights.

func (c *Client) PaymentsToggleChatStarGiftNotifications(ctx context.Context, request *PaymentsToggleChatStarGiftNotificationsRequest) (bool, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
EnabledboolWhether to enable or disable reception of notifications in the form of messageActionStarGiftUnique and messageActionStarGift service messages from the channel.
PeerInputPeerClassyesThe channel for which to receive or not receive notifications.

Returns

bool

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References