Compare commits

...
Author SHA1 Message Date
imcompiling c1b327ca05 Change regex to strip a 10th place 0 only.
build_develop / build (push) Successful in 36s
2025-03-21 13:56:28 -04:00
imcompiling fa39949b1a Merge branch 'main' of https://gitea.cheezers.org/imcompiling/agon
build_latest / build (push) Successful in 37s
2025-03-21 10:45:04 -04:00
imcompiling f1290af45b Remove a double respond. 2025-03-21 10:44:57 -04:00
+3 -5
View File
@@ -80,9 +80,7 @@ class SubmissionCog(commands.Cog):
if ( if (
verified_score := await self.verify_score(interaction, score, is_time_record=category.is_time_record) verified_score := await self.verify_score(interaction, score, is_time_record=category.is_time_record)
) is None: ) is None:
# This response message will be filled out better once command is split up to # Verify score handles responding. Might change when submit is split up.
# know which type it expects...
await interaction.response.send_message("Format was incorrect.", ephemeral=True)
return return
# Create submission verification request or submit score if verification not needed. # Create submission verification request or submit score if verification not needed.
@@ -210,9 +208,9 @@ class SubmissionCog(commands.Cog):
elif re.search("^[0-9](\\.[0-9])?$", score): elif re.search("^[0-9](\\.[0-9])?$", score):
# need to add 0 in seconds and leading colon and 0 # need to add 0 in seconds and leading colon and 0
score = "0:0" + score score = "0:0" + score
elif re.search("^[0]?[0-9]:[0-9]{2}(\\.[0-9])?$", score): elif re.search("^[0][0-9]:[0-9]{2}(\\.[0-9])?$", score):
# if there is a minute 10ths place 0, remove # if there is a minute 10ths place 0, remove
score = score.lstrip("0") score = score[1:]
return score return score