Skip to main content

messages.reorderPinnedForumTopics

Reorder pinned forum topics

func (c *Client) MessagesReorderPinnedForumTopics(ctx context.Context, request *MessagesReorderPinnedForumTopicsRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesReorderPinnedForumTopics(ctx, &tg.MessagesReorderPinnedForumTopicsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
ForceboolIf not set, the order of only the topics present both server-side and in order will be changed (i.e. mentioning topics not pinned server-side in order will not pin them, and not mentioning topics pinned server-side will not unpin them). If set, the entire server-side pinned topic list will be replaced with order (i.e. mentioning topics not pinned server-side in order will pin them, and not mentioning topics pinned server-side will unpin them)
PeerInputPeerClassyesThe supergroup forum, private chat (for forum-enabled bots) or bot forum (for users) where the topic is located.
Order[]intyesTopic IDs »

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.

References