fix: Some typos in config.

This commit is contained in:
2025-09-24 21:14:58 +10:00
parent 7853d0c115
commit a19bb8a8cb

View File

@@ -359,6 +359,7 @@ class SubathonComponent(cmds.Component):
timecap_seconds = timecap * 60 * 60 if timecap else None
subdata = await Subathon.create(
name="Subathon",
communityid=cid,
initial_time=initial_time,
sub1_score=sub1,
@@ -545,9 +546,9 @@ class SubathonComponent(cmds.Component):
# timecamp
cap = sdata.timecap or 0
caph = cap / 3600
caph = int(cap / 3600)
parts.append(
f"cap=\"{caph}\" (hours, 0 means no cap)"
f"cap={caph} (hours, 0 means no cap)"
)
# scores
@@ -624,7 +625,7 @@ class SubathonComponent(cmds.Component):
else:
# Display path
current_cap = active.subathondata.timecap or 0
caph = current_cap / 3600
caph = int(current_cap / 3600)
await ctx.reply(
"Duration cap for this subathon, in hours, including the initial time. "
"Contributions given after the cap has been reached will be accepted, "
@@ -647,12 +648,12 @@ class SubathonComponent(cmds.Component):
# Setting path
# Validate
splits = args.split()
if not len(splits) == 4 and all(split.isdigit() for split in splits):
if not len(splits) == 4 and all(split.isdecimal() for split in splits):
await ctx.reply(
f"USAGE: {ctx.prefix}subathon config socres [<t1score> <t2score> <t3score> <bitscore>]"
)
return
t1score, t2score, t3score, bitscore = map(int, splits)
t1score, t2score, t3score, bitscore = map(float, splits)
await active.subathondata.update(
sub1_score=t1score,
sub2_score=t2score,