Layer 220
ChannelsDeleteHistory
Delete the history of a supergroup
method
Users
channels.deleteHistory#9baa9647 flags:# for_everyone:flags.0?true channel:InputChannel max_id:int = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| ForEveryone | flags.0?true | Whether the history should be deleted for everyone |
| Channel | InputChannel | Supergroup whose history must be deleted |
| MaxId | int | ID of message up to which the history must be deleted |
Returns
UpdatesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 400 | CHANNEL_PARICIPANT_MISSING | The current user is not in the channel. |
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | CHANNEL_TOO_BIG | This channel has too many participants (>1000) to be deleted. |
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
Gogram Example
// ChannelsDeleteHistory - using Params struct result, err := client.ChannelsDeleteHistory(&tg.ChannelsDeleteHistoryParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, MaxId: 0, // Optional fields: // ForEveryone: true, }) if err != nil { // handle error } // result is *tg.Updates