Indent so that a command can properly use session.

Remove commented out code. Also add work to an issue.
This commit is contained in:
2025-03-14 17:20:50 -04:00
parent f722eb1a83
commit 5eb637a3a8
+3 -4
View File
@@ -54,7 +54,6 @@ class SetCog(commands.Cog, name="Set command."):
await interaction.response.send_message("Category or Group was not found.", ephemeral=True)
return
category.size = size
# session.add(category) test if this is needed. SQLAlchemy can do the update without adding.
session.commit()
# Use the relationship to get group category is in.
@@ -101,7 +100,6 @@ class SetCog(commands.Cog, name="Set command."):
await interaction.response.send_message("Category or Group was not found.", ephemeral=True)
return
category.is_ascending = ascending
# session.add(category) test if this is needed. SQLAlchemy can do the update without adding.
session.commit()
# Use the relationship to get group category is in.
@@ -148,7 +146,6 @@ class SetCog(commands.Cog, name="Set command."):
await interaction.response.send_message("Category or Group was not found.", ephemeral=True)
return
category.is_validated = validated
# session.add(category) test if this is needed. SQLAlchemy can do the update without adding.
session.commit()
await interaction.response.send_message(
@@ -184,7 +181,6 @@ class SetCog(commands.Cog, name="Set command."):
return
old_name = category.name
category.name = name
# session.add(category) test if this is needed. SQLAlchemy can do the update without adding.
session.commit()
# Use the relationship to get group category is in.
@@ -268,6 +264,9 @@ class SetCog(commands.Cog, name="Set command."):
return
group.channel_id = channel_id
session.commit()
# TODO(imcompiling): delete the message and call send_highscore_message to send a new one. Bug needs fixed
# first.
# 082
await interaction.send(f"Registered <#{channel_id}>.", ephemeral=True)
@group.subcommand(