channels.deleteParticipantHistory #

Delete all messages sent by a specific participant of a given supergroup

Layer 223

messages.affectedHistory#b45c69d1 pts:int pts_count:int offset:int = messages.AffectedHistory;
---functions---
channels.deleteParticipantHistory#367544db channel:InputChannel participant:InputPeer = messages.AffectedHistory;

Parameters #

NameTypeDescription
channelInputChannelSupergroup
participantInputPeerThe participant whose messages should be deleted

Result #

messages.AffectedHistory

Only users can use this method #

Possible errors #

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400MSG_ID_INVALIDInvalid message ID provided.
400PARTICIPANT_ID_INVALIDThe specified participant ID is invalid.