Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guard against other known limits #1076

Merged
merged 12 commits into from
Jun 29, 2024
7 changes: 7 additions & 0 deletions site/docs/advanced/flood.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ From the [Bot FAQ](https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-h
Completely unrelated to bulk notifications or how many messages are sent in the group.
And yet again, the auto-retry plugin will take care of this for you.

There are a few other known limits there were revealed outside of the official Bot API documentation.
For example, [it is known](https://t.me/tdlibchat/146123) that bots can only do up to 20 message edits in a minute per group chat.
However, this is the exception, and we also have to assume that these limits may be changed in the future.
Thus, this information does not affect how to program your bot.

For instance, throttling your bot based on these numbers is still a bad idea:

## Throttling

Some think that it is bad to run into rate limits.
Expand Down
7 changes: 7 additions & 0 deletions site/docs/id/advanced/flood.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ Berdasarkan [FAQ Bot](https://core.telegram.org/bots/faq#my-bot-is-hitting-limit
Yang ini sama sekali tidak ada hubungannya dengan notifikasi masal ataupun banyaknya pesan yang dikirim di dalam grup.
Sekali lagi, plugin auto-retry akan menanganinya dengan baik.

Ada beberapa batasan lain yang tidak tertulis di dokumentasi resmi API Bot.
Contohnya, [sudah diketahui](https://t.me/tdlibchat/146123) bahwa bot hanya dapat mengedit maksimal 20 pesan dalam satu menit per obrolan grup.
Namun, batasan ini tidaklah selamanya benar, karena ia bisa saja berubah di masa mendatang.
Lagi pula, informasi ini tidak memberikan dampak apapun ke cara kamu memprogram bot.

Misalnya, memperlambat bot kamu berdasarkan angka di atas tetaplah ide yang buruk:

## Pelambatan (Throttling)

Sebagian besar orang berpikir kalau mengalami _rate limit_ adalah hal yang buruk.
Expand Down
7 changes: 7 additions & 0 deletions site/docs/uk/advanced/flood.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ Telegram обмежує кількість повідомлень, які ваш
Абсолютно не повʼязано з масовими повідомленнями або з тим, скільки повідомлень надсилається в групі.
І знову ж таки, плагін `auto-retry` подбає про це за вас.

Існує кілька інших відомих обмежень, які були виявлені поза офіційною документацією Bot API.
Наприклад, [відомо](https://t.me/tdlibchat/146123), що боти можуть редагувати до 20 повідомлень на хвилину в груповому чаті.
Однак це виняток, і ми також повинні припустити, що ці обмеження можуть бути змінені в майбутньому.
Тож ця інформація не впливає на те, як запрограмувати вашого бота.

Зокрема, не варто обмежувати швидкість роботи бота на основі цих даних:

## Обмеження запитів

Дехто вважає, що впиратися в ліміти - це погано.
Expand Down
7 changes: 7 additions & 0 deletions site/docs/zh/advanced/flood.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ Telegram 对你的 bot 每秒钟能发送多少条信息进行了限制。
这完全与批量通知或群组中发送的消息数量无关。
并且同样,自动重试插件会为你处理这个问题。

在官方 Bot API 文档之外还披露了一些其他已知限制。
例如,[已知](https://t.me/tdlibchat/146123) bot 每分钟只能在每个群聊中进行最多 20 条消息编辑。
然而,这是例外,我们还必须假设这些限制将来可能会发生变化。
因此,此信息不会影响如何编写你的 bot。

例如,基于这些数字限制你的 bot 仍然是一个坏主意:

## 限流

有些人认为遇到速率限制是不好的。
Expand Down
Loading