mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-31 16:40:37 +01:00
146d42de37
This is not the cause of throttling issues that I was having, but something I think is a bug from reading the code. `history` is a deque that is kept sorted by the timestamp: old entries are popped from the front, and new entries are pushed to the back. To calculate `used` and `requests_sent.per_sec[chat]`, we want to count entries from the past second, so the newest ones, so from the back. For `take_while` to work as expected, it needs to be called on the reverse iterator, as the regular iterator is front-to-back. Otherwise `take_while` can finish early due to entries that are up to a minute old. |
||
---|---|---|
.. | ||
examples | ||
src | ||
Cargo.toml | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
schema.ron |
teloxide-core
The core part of teloxide
providing tools for making requests to the Telegram Bot API with ease. This library is fully asynchronous and built using tokio
.
teloxide-core = "0.10.1"
Compiler support: requires rustc 1.80+.