如何使用用户帐户阻止实体?

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



慕哥6287543
浏览 79回答 1
1回答

30秒到达战场

您需要使用所谓的原始 API。搜索“block”会将我们带到BlockRequest一个示例中:from telethon.sync import TelegramClientfrom telethon import functions, typeswith TelegramClient(name, api_id, api_hash) as client:    result = client(functions.contacts.BlockRequest(        id='username'    ))    print(result)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python