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.
One can use search to find the following report methods:
messages.ReportRequest to report one or more messages.account.ReportPeerRequest to report a user in private, chat or channel with a specific reason.messages.ReportSpamRequest to report a user in private, chat or channel without a reason.channels.ReportSpamRequest to report one or more messages of a user in a channel.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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With