什么是 Telegram 客户端消息限制? [英] What are Telegram Client Messaging limits?

查看:74
本文介绍了什么是 Telegram 客户端消息限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里 我知道 Telegram 限制 BOT 消息如下:

From here I know that Telegram limits BOT messages like this:

>每次聊天 1 条信息/秒

>30msg/秒不同的聊天

碰巧我没有使用 python-telegram-bot API,我正在通过 telethon 的库 使用普通客户端.尝试以该节奏发送消息时,我收到来自 Telegram 的 Flood\Spam 错误.顺便说一句,我正在使用 delayQueue 类来控制这样的消息限制:

Happens that I'am not using the python-telegram-bot API, I'am using a normal client through telethon's library. I'am getting Flood\Spam error from Telegram when trying to send messages in that cadence. BTW, I'am using delayQueue Class to control the messages limits like this:

dqueue = DelayQueue(burst_limit=29, time_limit_ms=1014)
dqueue(client.send_message,inputPeerUser,msg)

已经直接询问电报的支持,但没有得到答复.有人知道普通客户的限制是什么吗?

Already asked directly to telegram's support, but got no answer. Does someone know what are the limits to normal clients?

推荐答案

有 30 条消息/秒的限制.

There is a limit of 30 msg/sec.

此外,机器人可以将 API 请求用于有限的数量.次

Also,a bot can use the API requests for a limited no. of times

我通常在测试机器人时遇到这个错误.在测试过程中,会有很多场景需要测试.所以,我会发送大量请求.

I get this error when I usually test the bot.During testing,there would be a lot of scenarios to test.So,I would be sending a huge amount of requests.

我收到这样的错误,{error_code:429,description:Too many requests try after (some_time)}知道确切的限制.

I get an error like this, {error_code:429,description:Too many requests try after (some_time)} Idk the exact limit.

为避免这种情况:你不应该用请求淹没电报服务器

To avoid this: You should not flood the telegram server with requests

这篇关于什么是 Telegram 客户端消息限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆