report_user()

async Client.report_user()

Report a user for rule violations or abuse.

Usable by Users Bots
Parameters:
  • user_id (int | str) – Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str).

  • reason (ReportReason | str, optional) – The reason for reporting. Defaults to SPAM.

  • message (str, optional) – Additional explanatory text or details about the report. Defaults to “” (empty string).

Returns:

bool – True on success.

Example

from pyrogram.enums import ReportReason

# Report a spam user
await app.report_user(user_id, ReportReason.SPAM)

# Report a scam/impersonator user with description
await app.report_user(user_id, ReportReason.FAKE, "Fake account impersonating an admin")