Compare commits

..
2 changed files with 5 additions and 5 deletions
+5
View File
@@ -189,6 +189,11 @@ class SubmissionCreateButton(nextcord.ui.View):
self, button: nextcord.ui.Button, interaction: nextcord.Interaction
): # pylint: disable=unused-argument
"""Button for score submission."""
# Don't allow a user to start a new submission if one already exists
if interaction.user.id in submission_objects:
await interaction.send("Please finish in progress submission first.", ephemeral=True)
return
guild_id_str = str(interaction.guild.id)
guild_data = highscores_data[guild_id_str]
-5
View File
@@ -147,11 +147,6 @@ async def submit_score(
reverse=not boss_category_config["ascending"],
)
# enforce highscore size
while len(scores) > highscores_config["highscore_size"]:
scores.pop()
guild_data["tables"][boss_name]["categories"][category] = scores
# edit message
highscore_channel_id = guild_data["highscore_channel_id"]
print(f"Editting message {highscore_channel_id}")