问题
From here I know that Telgram limits BOT messages like this:
> 1msg/second per chat
> 30msg/second different chats
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 direcly to telegram's support, but got no answer. Does someone know what are the limits to normal clients?
回答1:
There is a limit of 30 msg/sec.
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.
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
来源:https://stackoverflow.com/questions/49329364/what-are-telegram-client-messaging-limits