Layer 220
ChannelsUpdatePaidMessagesPrice
Enable or disable paid messages in this supergroup or monoforum.
method
Users
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| BroadcastMessagesAllowed | flags.0?true | Only usable for channels, enables or disables the associated monoforum aka direct messages. |
| Channel | InputChannel | Pass the supergroup ID for supergroups and the ID of the channel to modify the setting in the associated monoforum. |
| SendPaidMessagesStars | long | Specifies the required amount of Telegram Stars users must pay to send messages to the supergroup or monoforum. |
Returns
UpdatesPossible 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. |
Gogram Example
// ChannelsUpdatePaidMessagesPrice - using Params struct result, err := client.ChannelsUpdatePaidMessagesPrice(&tg.ChannelsUpdatePaidMessagesPriceParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, SendPaidMessagesStars: int64(0), // Optional fields: // BroadcastMessagesAllowed: true, }) if err != nil { // handle error } // result is *tg.Updates