talkomatic.py
0.1.2
An easy-to-use Python versatile wrapper for the Talkomatic Bot interface ensuring best practices for making bots, and handling the REST API.
Loading...
Searching...
No Matches
rate_limits.py
Go to the documentation of this file.
1
from
dataclasses
import
dataclass
2
3
4
@dataclass
5
class
RateLimits
:
6
"""
7
A class representing the rate limits of bot actions
8
(to prevent get blocked by the API).
9
10
The original server's limits are:
11
- 1000 requests per minute
12
- 30 second cooldown on creating rooms
13
- message length and frequency limits
14
15
Composed of:
16
- message_cooldown: The cooldown in seconds between messages.
17
- room_join_cooldown: The cooldown in seconds between joining rooms.
18
- room_creation_cooldown: The cooldown in seconds between creating rooms.
19
"""
20
21
message_cooldown: float = 0.1
22
room_join_cooldown: float = 5
23
room_creation_cooldown: float = 30
24
25
DISABLE_RATE_LIMITS =
RateLimits
(message_cooldown = 0, room_join_cooldown = 0, room_creation_cooldown = 0)
26
27
__all__ = [
"RateLimits"
,
"DISABLE_RATE_LIMITS"
]
talkomatic.dataclasses.rate_limits.RateLimits
Definition
rate_limits.py:5
talkomatic
dataclasses
rate_limits.py
Generated by
1.13.2