account.ReportPeer

class pyrogram.raw.functions.account.ReportPeer

Report a peer for violation of telegram’s Terms of Service

Details:
  • Layer: 227

  • ID: C5BA3D86

Parameters:
  • peer (InputPeer) – The peer to report

  • reason (ReportReason) – The reason why this peer is being reported

  • message (str) – Comment for report moderation

Returns:

bool

TL Schema

account.reportPeer#c5ba3d86
peer:InputPeer
reason:ReportReason
message:string

= Bool

Parameter Tree

ReportPeer
├── peer → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_id → long
│ ├── InputPeerUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ ├── InputPeerChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_id → int
│ │ └── user_id → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── reason → ReportReason
│ ├── InputReportReasonSpam
│ ├── InputReportReasonFake
└── message → string

Example

await app.invoke(
    ReportPeer(
        peer=await app.resolve_peer(chat_id),
        reason=InputReportReasonSpam(),
        message="Hello",
    )
)