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

Say that the server is empty instead of 0

This commit is contained in:
RGBCube 2022-11-27 12:16:06 +03:00
parent 66e766d5ff
commit dd088912b8

View file

@ -54,7 +54,13 @@ class MinecraftServer(
) )
async def status(self, ctx: Context) -> None: async def status(self, ctx: Context) -> None:
status = await self.bot.server.status() 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.") @command(brief="Sends the link to the wiki.", help="Sends the link to the wiki.")
async def wiki(self, ctx: Context) -> None: async def wiki(self, ctx: Context) -> None: