Players list in wss example

This commit is contained in:
DarkCat09 2022-10-19 18:03:58 +04:00
parent c2610c04e5
commit cf73845b2b

View file

@ -28,9 +28,13 @@ async def state(
msg: Dict[Any, Any],
args: Tuple[str]) -> None:
# For debugging
print(args[0], 'received', len(msg), 'symbols')
# Write new info dictionary
server._info = msg
# Server 1 test is online
print(
args[0],
server.subdomain,
@ -38,6 +42,13 @@ async def state(
server.status
)
# Server 1 players: ['DarkCat09', 'someone']
print(
args[0],
'players:',
server.players_list
)
# Main function
async def main() -> None: