Layer 224
MessagesEditForumTopic
Edit forum topic.
method
Users
Bots
messages.editForumTopic#cecc1134 flags:# peer:InputPeer topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Peer | InputPeer | The supergroup forum, private chat (for forum-enabled bots) or bot forum (for users) where the topic is located. |
| TopicId | int | Topic ID |
| Title | flags.0?string | If present, will update the topic title (maximum UTF-8 length: 128). |
| IconEmojiId | flags.1?long | If present, updates the custom emoji used as topic icon. Telegram Premium users can use any custom emoji, other users can only use the custom emojis contained in the input Sticker Set Emoji Default Topic Icons emoji pack. Pass 0 to switch to the fallback topic icon. |
| Closed | flags.2?Bool | If present, will update the open/closed status of the topic. |
| Hidden | flags.3?Bool | If present, will hide/unhide the topic (only valid for the "General" topic, id=1 ). |
Returns
UpdatesGogram Example
// MessagesEditForumTopic - using Params struct result, err := client.MessagesEditForumTopic(&tg.MessagesEditForumTopicParams{ Peer: &tg.InputPeerUser{UserID: int64(777000)}, TopicId: 42, // Optional fields: // Title: "Hello, World!", // IconEmojiId: int64(1234567890), // Closed: true, // Hidden: true, }) if err != nil { // handle error } // result is *tg.Updates
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |