Skip to main content

channels.updatePaidMessagesPrice

Enable or disable paid messages » in this supergroup or monoforum. Also used to enable or disable monoforums aka direct messages in a channel. Note that passing the ID of the monoforum itself to channel will return a CHANNEL_MONOFORUM_UNSUPPORTED error: pass the ID of the associated channel to edit the settings of the associated monoforum, instead.

func (c *Client) ChannelsUpdatePaidMessagesPrice(ctx context.Context, request *ChannelsUpdatePaidMessagesPriceRequest) (UpdatesClass, error)

Calling this method

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

res, err := api.ChannelsUpdatePaidMessagesPrice(ctx, &tg.ChannelsUpdatePaidMessagesPriceRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
BroadcastMessagesAllowedboolOnly usable for channels, enables or disables the associated monoforum aka direct messages.
ChannelInputChannelClassyesPass the supergroup ID for supergroups and the ID of the channel to modify the setting in the associated monoforum.
SendPaidMessagesStarsint64yesSpecifies the required amount of Telegram Stars users must pay to send messages to the supergroup or monoforum.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_MONOFORUM_UNSUPPORTEDMonoforums do not support this feature.
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.
400STARS_AMOUNT_INVALIDThe specified amount in stars is invalid.

References