如何使用 Telethon 创建公共/私人频道?我在官方文档中没有找到这个信息。
在 1.5 版本中我是这样做的:
from telethon.tl.functions.channels import ExportInviteRequest
from telethon.tl.types import InputChannel, InputPeerChannel
ChannelLink = Client(ExportInviteRequest(
InputPeerChannel(channel_id=ChannelID,
access_hash=ChannelHash))).link
Run Code Online (Sandbox Code Playgroud)
但现在不起作用:
ImportError: cannot import name 'ExportInviteRequest'
Run Code Online (Sandbox Code Playgroud)
现在该怎么做呢?