Metadata-Version: 2.1
Name: limited_aiogram
Version: 1.0
Summary: Limit your api calls to avoid  "Flood control exceeded"
Author: chazovtema
Author-email: chazovtema@mail.ru
Project-URL: github, https://github.com/chazovtema/limited_aiogram
Keywords: aiogram,limit
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.1
Requires-Dist: aiogram>=3.0.0
Requires-Dist: limiter>=0.3.1
Requires-Dist: cachetools>=5.3.2

# 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!
```python
import limit_aiogram
limit_aiogram.path_bot()
```
It is also possible to use a separate class `LimitedBot`, without changing the original class

```python
import limit_aiogram
bot = limit_aiogram.LimitedBot('your token')
```

# Installation

`pip install limited_aiogram`
