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

'Refactored by Sourcery'

This commit is contained in:
Sourcery AI 2022-11-23 21:38:11 +00:00
parent c0e06d928b
commit 4f98f301b3

View file

@ -53,11 +53,11 @@ class MinecraftServer(
)
async def status(self, ctx: Context) -> None:
status = await self.bot.server.status()
onlineJ = requests.get(f"https://api.mcsrvstat.us/2/{self.bot.server.java.ip}") #
if status.players.online == 0:
message = f"Nobody is on the server at the moment."
message = "Nobody is on the server at the moment."
else:
message = f"The Minecraft server has {status.players.online} player(s) online."
if onlineJ.json()["online"] and status.players.online == 0: