25 lines
610 B
Python
25 lines
610 B
Python
from typing import Literal, NotRequired, TypedDict
|
|
|
|
|
|
class StartResponse(TypedDict):
|
|
status: Literal["running", "started"]
|
|
|
|
|
|
class StatusResponsePlayers(TypedDict):
|
|
online: int
|
|
max: int
|
|
list: list[str]
|
|
|
|
|
|
class StatusResponse(TypedDict):
|
|
status: Literal["online", "offline", "crashed", "maintainance", "starting"]
|
|
reason: NotRequired[str]
|
|
motd: NotRequired[str]
|
|
icon: NotRequired[str | None]
|
|
players: NotRequired[StatusResponsePlayers]
|
|
|
|
|
|
class Responses:
|
|
StartResponse = StartResponse
|
|
StatusResponsePlayers = StatusResponsePlayers
|
|
StatusResponse = StatusResponse
|