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
| 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. |
Q | string | — | Search query |
OffsetDate | int | yes | Offsets 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. |
OffsetID | int | yes | Offsets for pagination, for more info click here, ID of the last message of the last found topic (or initially 0). |
OffsetTopic | int | yes | Offsets for pagination, for more info click here, ID of the last found topic (or initially 0). |
Limit | int | yes | Maximum 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
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.getForumTopics#3ba47bff