account.ReportPeer

class pyrogram.raw.functions.account.ReportPeer

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

Details:
  • Layer: 223

  • 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
├── peerInputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ │ └── chat_idlong
│ ├── InputPeerUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ ├── InputPeerChannel
│ │ ├── channel_idlong
│ │ └── access_hashlong
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── msg_idint
│ │ └── user_idlong
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── channel_idlong
├── reasonReportReason
│ ├── InputReportReasonSpam
│ ├── InputReportReasonFake
└── messagestring

Example

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