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
| Name | Type | Required | Description |
|---|---|---|---|
BroadcastMessagesAllowed | bool | — | Only usable for channels, enables or disables the associated monoforum aka direct messages. |
Channel | InputChannelClass | yes | Pass the supergroup ID for supergroups and the ID of the channel to modify the setting in the associated monoforum. |
SendPaidMessagesStars | int64 | yes | Specifies the required amount of Telegram Stars users must pay to send messages to the supergroup or monoforum. |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_MONOFORUM_UNSUPPORTED | Monoforums do not support this feature. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 400 | STARS_AMOUNT_INVALID | The specified amount in stars is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.updatePaidMessagesPrice#4b12327b