BF: Add 'motd' arg to cli
This commit is contained in:
parent
1dab9e7716
commit
59027075e8
|
@ -21,6 +21,10 @@ async def get_name(server: AIOMCServer) -> str:
|
||||||
return await server.name
|
return await server.name
|
||||||
|
|
||||||
|
|
||||||
|
async def get_motd(server: AIOMCServer) -> str:
|
||||||
|
return await server.motd
|
||||||
|
|
||||||
|
|
||||||
async def get_count(server: AIOMCServer) -> int:
|
async def get_count(server: AIOMCServer) -> int:
|
||||||
return await server.players_count
|
return await server.players_count
|
||||||
|
|
||||||
|
@ -40,6 +44,8 @@ async def action() -> None:
|
||||||
out = get_max(server)
|
out = get_max(server)
|
||||||
case 'pcount':
|
case 'pcount':
|
||||||
out = get_count(server)
|
out = get_count(server)
|
||||||
|
case 'motd':
|
||||||
|
out = get_motd(server)
|
||||||
case _:
|
case _:
|
||||||
raise RuntimeError
|
raise RuntimeError
|
||||||
print(await out)
|
print(await out)
|
||||||
|
|
Loading…
Reference in New Issue