ReportEncryptedSpamRequest

Only users can use this request. See code examples.

---functions---
messages.reportEncryptedSpam#4b0c8c0f peer:InputEncryptedChat = Bool

Returns

Bool

This type has no instances available.

Parameters

peerInputEncryptedChat

Known RPC errors

This request can cause 1 known error:

ChatIdInvalidErrorInvalid object ID for a chat. Make sure to pass the right types, for instance making sure that the request is designed for chats (not channels/megagroups) or otherwise look for a different one more suited\nAn example working with a megagroup and AddChatUserRequest, it will fail because megagroups are channels. Use InviteToChannelRequest instead.

You can import these from telethon.errors.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.messages.ReportEncryptedSpamRequest(
        peer=types.InputEncryptedChat(
            chat_id=478614198,
            access_hash=-12398745604826
        )
    ))
    print(result)