Python Telethon试图加入一个团体
你好,我想用telethon把我自己加入电报组 我试过这个:Python Telethon试图加入一个团体,python,telegram,telethon,Python,Telegram,Telethon,你好,我想用telethon把我自己加入电报组 我试过这个: from telethon.tl.functions.messages import ImportChatInviteRequest updates = client(ImportChatInviteRequest('grouphash')) 但是得到错误: 回溯(最近一次呼叫最后一次): 文件“jg.py”,第12行,在 更新=客户端(ImportChatInviteRequest('grouphash')) telethon.e
from telethon.tl.functions.messages import ImportChatInviteRequest
updates = client(ImportChatInviteRequest('grouphash'))
但是得到错误:
回溯(最近一次呼叫最后一次):
文件“jg.py”,第12行,在
更新=客户端(ImportChatInviteRequest('grouphash'))
telethon.errors.rpcerrorlist.InviteHashInvalidError:邀请哈希无效(由ImportChatInviteRequest引起)
请注意,散列是链接后面的部分(例如,
https://t.me/
,仅应使用
零件)。此外,用户名也不是“散列”,它们具有JoinChannelRequest
。感谢您的帮助。我在代码中使用了t.me/后面的hash部分,其中'grouphash'是,但它不起作用。对不起,https://t.me/joinchat/
和https://t.me/
是我的意思(注意它们不同)。请注意,散列是链接后面的部分(例如,https://t.me/
,仅应使用
零件)。此外,用户名也不是“散列”,它们具有JoinChannelRequest
。感谢您的帮助。我在代码中使用了t.me/后面的hash部分,其中'grouphash'是,但它不起作用。对不起,https://t.me/joinchat/
和https://t.me/
就是我的意思(请注意它们是不同的)。