Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我阅读了 Telethon 文档以检索用户名并加入频道。经过一些尝试,我写了这段代码:
result = client.invoke(ResolveUsernameRequest('XXXX')) channel = InputChannel(result.peer.channel_id, result.chats[0].access_hash) client.invoke(JoinChannelRequest(channel))
此代码工作正常,但我想知道是否有更好或更简单的方法?
第一次升级电视马拉松
from telethon.tl.functions.messages import ImportChatInviteRequest updates = client(ImportChatInviteRequest('hash_invite _channel'))