Update the message when updating pad length.

This commit is contained in:
2025-03-07 11:24:45 -05:00
parent 0ff1b07096
commit feeb47d3da
+4
View File
@@ -191,11 +191,15 @@ class SetCog(commands.Cog, name="Set command."):
.where(col(CategoryGroup.id) == int(group_id)) .where(col(CategoryGroup.id) == int(group_id))
) )
group = session.scalar(stmt) group = session.scalar(stmt)
if group is None:
await interaction.response.send_message("Group was not found.", ephemeral=True)
return
group.PadLength = length group.PadLength = length
session.commit() session.commit()
await interaction.response.send_message( await interaction.response.send_message(
f"Category pad length set to {length} for {group.name}", ephemeral=True f"Category pad length set to {length} for {group.name}", ephemeral=True
) )
await send_highscore_message(session, interaction.guild, group)
@group.subcommand( @group.subcommand(
description="Registers the channel for submission messages. Currently this information is deprecated." description="Registers the channel for submission messages. Currently this information is deprecated."