messages.editForumTopic
Edit forum topic.
func (c *Client) MessagesEditForumTopic(ctx context.Context, request *MessagesEditForumTopicRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesEditForumTopic(ctx, &tg.MessagesEditForumTopicRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The supergroup forum, private chat (for forum-enabled bots) or bot forum (for users) where the topic is located. |
TopicID | int | yes | Topic ID |
Title | string | — | If present, will update the topic title (maximum UTF-8 length: 128). |
IconEmojiID | int64 | — | 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 inputStickerSetEmojiDefaultTopicIcons emoji pack. Pass 0 to switch to the fallback topic icon. |
Closed | bool | — | If present, will update the open/closed status of the topic. |
Hidden | bool | — | If present, will hide/unhide the topic (only valid for the "General" topic, id=1). |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.editForumTopic#cecc1134