mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 00:47:44 +00:00
Say that the server is empty instead of 0
This commit is contained in:
parent
66e766d5ff
commit
dd088912b8
1 changed files with 7 additions and 1 deletions
|
@ -54,7 +54,13 @@ class MinecraftServer(
|
|||
)
|
||||
async def status(self, ctx: Context) -> None:
|
||||
status = await self.bot.server.status()
|
||||
await ctx.reply(f"The Minecraft server has {status.players.online} players online.")
|
||||
|
||||
if (online := status.players.online) == 0:
|
||||
message = "The Minecraft server has nobody online :(."
|
||||
else:
|
||||
message = f"The Minecraft server has {online} players online."
|
||||
|
||||
await ctx.reply(message)
|
||||
|
||||
@command(brief="Sends the link to the wiki.", help="Sends the link to the wiki.")
|
||||
async def wiki(self, ctx: Context) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue