Skip to main content

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​

NameTypeRequiredDescription
PeerInputPeerClassyesThe supergroup forum, private chat (for forum-enabled bots) or bot forum (for users) where the topic is located.
TopicIDintyesTopic ID
Titlestring—If present, will update the topic title (maximum UTF-8 length: 128).
IconEmojiIDint64—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.
Closedbool—If present, will update the open/closed status of the topic.
Hiddenbool—If present, will hide/unhide the topic (only valid for the "General" topic, id=1).

Returns​

UpdatesClass

Possible errors​

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.

References​