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-0.1.2.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for limited_aiogram-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ce178ad1943aa6d23ba1abc6dab75534f8b4a987a2668673be5a97b85c509fb |
|
MD5 | ddeedd8bd7edc3bc6d25fe94e1be1d91 |
|
BLAKE2b-256 | e55a6cb339048f874b82a1bc0ed4bf34516dd35b7dbdee2b0e2fa7389d141358 |