Invitetochannelrequest(Telethon)的错误

发布于 2025-01-22 14:50:55 字数 528 浏览 0 评论 0原文

我正在尝试使用Telethon(InviteTochannelRequest)邀请人们进入我的频道,

api_id = 12345
api_hash = '123abc123'
client = TelegramClient('test1', api_id, api_hash)
client.start()

client(InviteToChannelRequest(
    -100********,
    ['87654321']
))

我使用@getMyID_Bot查找我的频道ID:从聊天中转发:-100 ******** 我有一个错误:

ValueError: Could not find the input entity for PeerUser(user_id=100********) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.

I'm trying to invite people to my channel using telethon (InviteToChannelRequest)

api_id = 12345
api_hash = '123abc123'
client = TelegramClient('test1', api_id, api_hash)
client.start()

client(InviteToChannelRequest(
    -100********,
    ['87654321']
))

i using @getmyid_bot to find id of my channel: Forwarded from chat: -100********
and i have an error:

ValueError: Could not find the input entity for PeerUser(user_id=100********) (PeerUser). Please read https://docs.telethon.dev/en/latest/concepts/entities.html to find out more details.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文