messages.deleteTopicHistory
Delete message history of a forum topic
func (c *Client) MessagesDeleteTopicHistory(ctx context.Context, request *MessagesDeleteTopicHistoryRequest) (*MessagesAffectedHistory, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesDeleteTopicHistory(ctx, &tg.MessagesDeleteTopicHistoryRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *MessagesAffectedHistory
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. |
TopMsgID | int | yes | Topic ID |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.deleteTopicHistory#d2816f10