我想用用户帐户阻止像用户或机器人这样的实体。我找不到任何方法。此外,最好有一些解除阻止实体的方法。
1 回答

30秒到达战场
TA贡献1828条经验 获得超6个赞
您需要使用所谓的原始 API。搜索“block”会将我们带到BlockRequest一个示例中:
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.contacts.BlockRequest(
id='username'
))
print(result)
添加回答
举报
0/150
提交
取消