delete_user_history()#

Client.delete_user_history()#

Delete all messages sent by a certain user in a supergroup.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

  • user_id (int | str) – Unique identifier (int) or username (str) of the user whose messages will be deleted.

Returns:

bool – True on success, False otherwise.