【发布时间】:2018-01-19 21:28:43
【问题描述】:
from telethon import TelegramClient
from telethon.tl.functions.messages import ImportChatInviteRequest
api_id = ++++
api_hash = '+++++++++++++++++++++'
client = TelegramClient('+1 ++++++', api_id, api_hash)
client.connect()
updates = client(ImportChatInviteRequest('GQVuGUG5pPEBxM6tQAeqqA'))
我想加入这个群电报 (https://t.me/joinchat/GQVuGUG5pPEBxM6tQAeqqA) 但是我有这个错误
Traceback (most recent call last):
updates = client(ImportChatInviteRequest('GQVuGUG5pPEBxM6tQAeqqA'))
TypeError: 'TelegramClient' object is not callable
我使用这个脚本:https://github.com/LonamiWebs/Telethon/wiki/Joining-a-chat-or-channel
【问题讨论】:
-
显然不能调用
client,TelegramClient实例。你为什么叫它? -
其他命令很好,但是当我想要联合组并使用 ImportChatInviteRequest 我看到错误
-
在这种情况下,您应该向软件包维护者提出问题,因为假设您的
client是正确的,但实际代码与文档不一致。 -
Tanx Lonami 我升级了 telithon 并且正在工作......