mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
Add player list to status
This commit is contained in:
parent
4860e69b3c
commit
8a5c8a16a2
1 changed files with 2 additions and 1 deletions
|
@ -62,7 +62,8 @@ class MinecraftServer(
|
||||||
if (online := status.players.online) == 0:
|
if (online := status.players.online) == 0:
|
||||||
message = "The Minecraft server has nobody online :(."
|
message = "The Minecraft server has nobody online :(."
|
||||||
else:
|
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)
|
await ctx.reply(message)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue