mirror of
https://github.com/UiO-Gaming/mustafa.git
synced 2026-11-07 06:44:26 +01:00
handle singular vs plural names for "dager"
This commit is contained in:
1 file changed
+4
-3
+4
-3
@@ -305,9 +305,10 @@ class Streak(commands.Cog):
|
||||
if not streaks:
|
||||
return await interaction.followup.send(embed=embed_templates.error_warning("Ingen har noen streak enda"))
|
||||
|
||||
streaks_formatted = [
|
||||
f"**#{s[0]+1}** <@{s[1][0]}> - {(discord.utils.utcnow() - s[1][1]).days} dager" for s in enumerate(streaks)
|
||||
]
|
||||
streaks_formatted = []
|
||||
for i, (user_id, streak_start_time) in enumerate(streaks, start=1):
|
||||
days = (discord.utils.utcnow() - streak_start_time).days
|
||||
streaks_formatted.append(f"**#{i}** <@{user_id}> - {days} {'dag' if days == 1 else 'dager'}")
|
||||
|
||||
paginator = misc_utils.Paginator(streaks_formatted)
|
||||
view = discord_utils.Scroller(paginator, interaction.user)
|
||||
|
||||
Reference in new issue
Block a user