fix: Formatting and missing formats.

This commit is contained in:
2023-08-18 12:37:46 +03:00
parent aa1c2655b9
commit a0c56ebc13
5 changed files with 8 additions and 8 deletions

View File

@@ -235,14 +235,14 @@ class Timer:
pattern = self.pattern
name = self.base_name
if stage is not None:
remaining = str(int(5 * math.ceil((stage.end - utc_now()).total_seconds() / 60)))
remaining = int(5 * math.ceil((stage.end - utc_now()).total_seconds() / 60))
stagestr = t(self.focus_name if stage.focused else self.break_name, locale=self.locale.value)
else:
remaining = str(self.data.focus_length // 60)
remaining = self.data.focus_length // 60
stagestr = t(self.focus_name, locale=self.locale.value)
mapping = {
'{remaining}': remaining,
'{remaining}': f"{remaining}m",
'{stage}': stagestr,
'{members}': str(len(self.members)),
'{name}': name,

View File

@@ -152,7 +152,7 @@ class RankOverviewUI(MessageUI):
'ui:rank_overview|menu:roles|error:above_caller',
"You have insufficient permissions to assign {mention} as a rank role! "
"You may only manage roles below your top role."
))
)).format(mention=role.mention)
embed = discord.Embed(
title=t(_p(
'ui:rank_overview|menu:roles|error:above_caller|title',

View File

@@ -94,7 +94,7 @@ class StatsCog(LionCog):
@appcmds.describe(
season_start=_p(
'cmd:configure_statistics|param:season_start|desc',
"Time from which to start counting activity for rank badges and season leadeboards."
"Time from which to start counting activity for rank badges and season leaderboards. (YYYY-MM-DD)"
)
)
@appcmds.default_permissions(manage_guild=True)

View File

@@ -221,14 +221,14 @@ class GoalEditor(FastModal):
t(_p(
'modal:goal_editor|field:text_goal|error:NAN',
"The provided message goal `{input}` is not a number! Please try again."
))
)).format(input=string)
)
elif self.stat_page.stat is StatType.ANKI:
raise UserInputError(
t(_p(
'modal:goal_editor|field:anki_goal|error:NAN',
"The provided card goal `{input}` is not a number! Please try again."
))
)).format(input=string)
)
else:
result = int(string)

View File

@@ -984,7 +984,7 @@ class TimestampSetting(InteractiveSetting[ParentID, str, dt.datetime]):
raise UserInputError(t(_p(
'settype:timestamp|parse|error:invalid',
"Could not parse `{provided}` as a timestamp. Please use `YYYY-MM-DD HH:MM` format."
)))
)).format(provided=string))
return ts
@classmethod