Skip to main content

messages.getForumTopics

Get topics of a forum

func (c *Client) MessagesGetForumTopics(ctx context.Context, request *MessagesGetForumTopicsRequest) (*MessagesForumTopics, error)

Calling this method​

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

res, err := api.MessagesGetForumTopics(ctx, &tg.MessagesGetForumTopicsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesForumTopics
return nil
})

Parameters​

NameTypeRequiredDescription
PeerInputPeerClassyesThe supergroup forum, private chat (for forum-enabled bots) or bot forum (for users) where the topic is located.
Qstring—Search query
OffsetDateintyesOffsets for pagination, for more info click here, date of the last message of the last found topic. Use 0 or any date in the future to get results from the last topic.
OffsetIDintyesOffsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0).
OffsetTopicintyesOffsets for pagination, for more info click here, ID of the last found topic (or initially 0).
LimitintyesMaximum number of results to return, see pagination. For optimal performance, the number of returned topics is chosen by the server and can be smaller than the specified limit.

Returns​

*MessagesForumTopics

Possible errors​

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.

References​