python - Telegram API python 联合小组(telithon telegram)

标签 python telegram

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'))

我想加入这个群组 Telegram ( 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

最佳答案

升级 telithon telegram

pip install --upgrade telethon

关于python - Telegram API python 联合小组(telithon telegram),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45633905/

相关文章:

javascript - 在 Django 项目外加载 javascript 文件

python - Twisted - 该代码是否应该在单独的线程中运行

python - 在 SQLAlchemy session.add 中传递许多项目

c# - 如何使用 API 和 C# 向 telegram 发送消息?

python - Telegram 不再接受通配符证书。在 pythonanywhere 中出现错误

javascript - Try/Catch 不能防止崩溃

python - 从 ElasticSearch 结果创建 DataFrame

python - 如何使用 numpy 数组访问列表的条目而不使用 for 循环

python - 如何将 Telegram python变量值保存到本地数据库?

python - 如何使用 Telethon 将图像下载到我的本地 PC