Skip to main content

channels.reportSpam

Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup

func (c *Client) ChannelsReportSpam(ctx context.Context, request *ChannelsReportSpamRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.ChannelsReportSpam(ctx, &tg.ChannelsReportSpamRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
ChannelInputChannelClassyesSupergroup
ParticipantInputPeerClassyesParticipant whose messages should be reported
ID[]intyesIDs of spam messages

Returns

bool

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400INPUT_USER_DEACTIVATEDThe specified user was deleted.
400MSG_ID_INVALIDInvalid message ID provided.
400USER_ID_INVALIDThe provided user ID is invalid.

References