MadelineProto/docs/docs/FLOOD_WAIT.md

19 lines
548 B
Markdown
Raw Normal View History

2018-03-20 15:47:34 +01:00
# Avoiding FLOOD_WAITs
If you make too many requests to telegram, you might get FLOOD_WAITed for a while.
To avoid these flood waits, you must calculate the flood wait rate.
Calculate it by making N of method calls until you get a FLOOD_WAIT_X
```
floodwaitrate = time it took you to make the method calls + X
```
2018-03-20 16:02:36 +01:00
Use sleep to execute max N calls in `floodwaitrate` seconds, this way you won't get flood waited!
2018-03-20 20:43:11 +01:00
2018-03-20 22:18:19 +01:00
2018-03-20 17:36:07 +01:00
<form action="https://docs.madelineproto.xyz/docs/LOGGING.html"><input type="submit" value="Next section" /></form>