From a19bb8a8cb6df2fb005d2654c48f810ea248d7db Mon Sep 17 00:00:00 2001 From: Interitio Date: Wed, 24 Sep 2025 21:14:58 +1000 Subject: [PATCH] fix: Some typos in config. --- subathon/component.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/subathon/component.py b/subathon/component.py index 1a61b62..719398e 100644 --- a/subathon/component.py +++ b/subathon/component.py @@ -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 [ ]" ) 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,