Genesis commit
This commit is contained in:
commit
eb92d2d36f
17 changed files with 408 additions and 0 deletions
25
responses.py
Normal file
25
responses.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue