messages.updatePinnedForumTopic
Pin or unpin forum topics
func (c *Client) MessagesUpdatePinnedForumTopic(ctx context.Context, request *MessagesUpdatePinnedForumTopicRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesUpdatePinnedForumTopic(ctx, &tg.MessagesUpdatePinnedForumTopicRequest{
// 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 | Forum topic ID |
Pinned | bool | yes | Whether to pin or unpin the topic |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.updatePinnedForumTopic#175df251