我在python中使用Telethon来回复电报组的自动回复。我想报告垃圾邮件或滥用帐户自动通过Telethon和我阅读Telethon文档和谷歌,但我找不到任何例子。如果可以这样做,请提供一个示例代码。
发布于 2019-08-02 13:21:47
一个可以使用搜索来查找以下报告方法:
messages.ReportRequest报告一个或多个消息。account.ReportPeerRequest以特定的原因向用户报告私密、聊天或频道。messages.ReportSpamRequest用于无缘无故地报告用户的私密、聊天或频道。channels.ReportSpamRequest用于报告信道中用户的一条或多条消息。发布于 2019-08-02 13:20:40
https://tl.telethon.dev/methods/messages/report.html
页面中的示例:
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)https://stackoverflow.com/questions/57327185
复制相似问题