1
Fork 0
mirror of https://github.com/RGBCube/minearchy-bot synced 2025-07-27 00:47:44 +00:00

Add player list to status

This commit is contained in:
RGBCube 2022-12-30 21:06:08 +03:00
parent 4860e69b3c
commit 8a5c8a16a2

View file

@ -62,7 +62,8 @@ class MinecraftServer(
if (online := status.players.online) == 0:
message = "The Minecraft server has nobody online :(."
else:
message = f"The Minecraft server has {online} players online."
player_list = '\n'.join(f"- {player.name}" for player in status.players.sample)
message = f"The Minecraft server has {online} players online:\n{player_list}"
await ctx.reply(message)