Limit your api calls to avoid "Flood control exceeded"
Project description
What is it?
Limited aiogram is an add-on for the original aiogram Bot. This package allows you to limit how often your bot sends messages
Telegram api limits
Telegram has a number of restrictions for sending messages:
- 30 messages per second to multiple users
- 20 requests/sec to group
- 1 message per second to individual chat
Usage
The code below patches the original Bot class from aiogram, these changes are not reversible!
import limit_aiogram
limit_aiogram.path_bot()
It is also possible to use a separate class LimitedBot
, without changing the original class
import limit_aiogram
bot = limit_aiogram.LimitedBot('your token')
Installation
pip install limited_aiogram
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
limited_aiogram-1.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for limited_aiogram-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7056533e8abc15871925f11b00a9f3543560fb2fd7fdb43e2680e0f13fb42de5 |
|
MD5 | eefb5fd69c21d762c79d6e022c3327df |
|
BLAKE2b-256 | 28edb8b9c4de413b64939747bb9602f6f748a83fab745afbd9f242532680aa43 |