BF: Add 'motd' arg to cli

This commit is contained in:
trueold89 2024-07-07 15:37:45 +03:00
parent 1dab9e7716
commit 59027075e8
Signed by: trueold89
GPG Key ID: C122E85DD49E6B30
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,10 @@ async def get_name(server: AIOMCServer) -> str:
return await server.name
async def get_motd(server: AIOMCServer) -> str:
return await server.motd
async def get_count(server: AIOMCServer) -> int:
return await server.players_count
@ -40,6 +44,8 @@ async def action() -> None:
out = get_max(server)
case 'pcount':
out = get_count(server)
case 'motd':
out = get_motd(server)
case _:
raise RuntimeError
print(await out)