Skip to content

Commit

Permalink
fix /status not working with no mogi open
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyjassin committed Nov 10, 2024
1 parent 31799d6 commit fd6f39b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cogs/rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,22 @@ async def room(self, ctx: MogiApplicationContext):
async def status(self, ctx: MogiApplicationContext):
room: Room = get_room_info("lounge")

data = {}

if not ctx.mogi:
title = "No mogi"
elif not ctx.mogi.isPlaying:
title = f"Gathering: {len(ctx.mogi.players)}"
else:
title = f"{len(ctx.mogi.players)} players already playing right now"

if ctx.mogi:
data["Players"] = f"{len(ctx.mogi.players)}/12"

data["On Server"] = f"{len(room.players)}/12"

await ctx.respond(
embed=create_embed(
title=title,
description=None,
fields={
"Players": f"{len(ctx.mogi.players)}/12",
"On Server": f"{len(room.players)}/12",
},
)
embed=create_embed(title=title, description=None, fields=data)
)


Expand Down

0 comments on commit fd6f39b

Please sign in to comment.