去年,我用 Telethon 库开发了一个 GATE:
https://github.com/LonamiWebs/Telethon
门在更多客户端和 Telegram 服务器之间工作。它工作得很好。目前它不起作用。在我的代码中,它创建了一个连接到电报服务器的线程。在这个线程的run()函数中,它调用了方法:
self.client.add_update_handler(self.update_handler)
然后 Thread 中的方法 update_handler 管理更新...
现在,错误如下:
self.client.add_update_handler(self.update_handler)
AttributeError: 'TelegramClient' object has no attribute 'add_update_handler'
为什么?