48 def get(cls) -> "ServerConfig":
49 response = requests_get(f
"https://classic.talkomatic.co/api/v1/config?token={get_auth_bot_token()}")
50 if response.status_code != 200:
raise RuntimeError(
"The talkomatic.co server is down.")
51 data = response.json()
52 limits = data[
"limits"]
53 features = data[
"features"]
54 versions = data[
"versions"]
57 max_username_length = limits[
"MAX_USERNAME_LENGTH"],
58 max_afk_time = limits[
"MAX_AFK_TIME"],
59 max_location_length = limits[
"MAX_LOCATION_LENGTH"],
60 max_room_name_length = limits[
"MAX_ROOM_NAME_LENGTH"],
61 max_message_length = limits[
"MAX_MESSAGE_LENGTH"],
62 max_room_capacity = limits[
"MAX_ROOM_CAPACITY"],
63 max_connections_per_ip = limits[
"MAX_CONNECTIONS_PER_IP"],
64 socket_max_requests_window = limits[
"SOCKET_MAX_REQUESTS_WINDOW"],
65 socket_max_requests_per_window = limits[
"SOCKET_MAX_REQUESTS_PER_WINDOW"],
66 chat_update_rate_limit = limits[
"CHAT_UPDATE_RATE_LIMIT"],
67 typing_rate_limit = limits[
"TYPING_RATE_LIMIT"],
68 connection_delay = limits[
"CONNECTION_DELAY"],
69 word_filter_enabled = features[
"ENABLE_WORD_FILTER"],
70 api_version = versions[
"API"],
71 server_version = versions[
"SERVER"]