Layer 220
ChannelsToggleForum
Enable or disable forum functionality in a supergroup.
method
Users
channels.toggleForum#3ff75734 channel:InputChannel enabled:Bool tabs:Bool = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Channel | InputChannel | Supergroup ID |
| Enabled | Bool | Enable or disable forum functionality |
| Tabs | Bool | If true enables the tabbed forum UI, otherwise enables the list-based forum UI. |
Returns
UpdatesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHAT_DISCUSSION_UNALLOWED | You can't enable forum topics in a discussion group linked to a channel. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
Gogram Example
// ChannelsToggleForum - positional arguments result, err := client.ChannelsToggleForum(&tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, true, true) if err != nil { // handle error } // result is *tg.Updates