Skip to content

Commit

Permalink
Fix plural in /games command (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunarmagpie authored Nov 23, 2024
1 parent 6c9df5a commit 9490c90
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot/exts/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

from asyncio import gather
from collections import Counter
from collections.abc import Iterable
from datetime import datetime as dt
from datetime import timezone
from io import BytesIO
from itertools import islice
from math import ceil, sqrt
from re import compile as re_compile
from typing import Iterable

from apscheduler.schedulers.asyncio import AsyncIOScheduler
from interactions import (
Expand Down
9 changes: 8 additions & 1 deletion bot/exts/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ async def count(self: GameExt, ctx: ComponentContext) -> None:
"""Get the number of games being played on this server."""
server: Server = self.manager.get_server(ctx.guild_id)

await ctx.send(f"There are {await server.get_game_count()} games on this server")
game_count = await server.get_game_count()

if (game_count == 1):
game_message = "is 1 game"
else:
game_message = f"are {game_count} games"

await ctx.send(f"There {game_message} on this server")

async def update_status(self: GameExt) -> None:
"""Update the bots status."""
Expand Down

0 comments on commit 9490c90

Please sign in to comment.