skip to Main Content

I’m using Telethon in python to automatic replies in Telegram’s Group. I wanna reporting spam or abuse an account automatically via the Telethon and I read the Telethon document and google it, but I can’t find any example.
If this can be done, please provide an example with a sample code.

2

Answers


  1. https://tl.telethon.dev/methods/messages/report.html

    Example from page:

    from telethon.sync import TelegramClient
    from telethon import functions, types
    
    with TelegramClient(name, api_id, api_hash) as client:
        result = client(functions.messages.ReportRequest(
            peer='username',
            id=[42],
            reason=types.InputReportReasonSpam()
        ))
        print(result)
    
    Login or Signup to reply.
  2. One can use search to find the following report methods:

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search