account.reportPeer
Report a peer for violation of telegram's Terms of Service
func (c *Client) AccountReportPeer(ctx context.Context, request *AccountReportPeerRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountReportPeer(ctx, &tg.AccountReportPeerRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The peer to report |
Reason | ReportReasonClass | yes | The reason why this peer is being reported |
Message | string | yes | Comment for report moderation |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.reportPeer#c5ba3d86