带有get_stats的频道消息统计信息

发布于 2025-01-23 13:46:07 字数 265 浏览 0 评论 0原文

我试图使用Telethon GET_STATS获取消息统计信息。

channel = '@test'
async with client:
    stats = await client.get_stats(entity=channel,message=92)
    print(stats.stringify())

但是我不断获得chatadminrequirederror

它只能用于我的管理频道吗?

I'am trying to get message statistics using telethon get_stats.

channel = '@test'
async with client:
    stats = await client.get_stats(entity=channel,message=92)
    print(stats.stringify())

But I keep getting ChatAdminRequiredError

Can it be used only for channels where I am admin?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

街角卖回忆 2025-01-30 13:46:07

来自 docs docs :

请注意,在能够获取统计信息之前,某些限制适用,特别是该渠道必须具有足够的成员(对于MegaGroup,这需要至少500名成员)。

如果没有足够的成员(命名较差)错误,例如telethon.errors.chatadminrequirederror

From the docs:

Note that some restrictions apply before being able to fetch statistics, in particular the channel must have enough members (for megagroups, this requires at least 500 members).

and

If there are not enough members (poorly named) errors such as telethon.errors.ChatAdminRequiredError will appear.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文