Compare commits
2
Commits
0ff1b07096
...
f61ad83e11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f61ad83e11 | ||
|
|
feeb47d3da |
+14
-11
@@ -61,11 +61,12 @@ class SetCog(commands.Cog, name="Set command."):
|
||||
# Use the relationship to get group category is in.
|
||||
group = category.category_group
|
||||
if group is None:
|
||||
await interaction.response.send_message(
|
||||
f"An error with {category.name} and group relationship. Contact developer. Size was still updated.",
|
||||
ephemeral=True,
|
||||
)
|
||||
agon_logger.error(f"{category.name}:{category.id} group relationship was None.")
|
||||
|
||||
stmt = select(CategoryGroup).where(col(CategoryGroup.id) == group_id)
|
||||
group = session.scalar(stmt)
|
||||
if group is None:
|
||||
await interaction.response.send_message("Group was not found.", ephemeral=True)
|
||||
return
|
||||
|
||||
await send_highscore_message(session, interaction.guild, group)
|
||||
@@ -108,14 +109,12 @@ class SetCog(commands.Cog, name="Set command."):
|
||||
# Use the relationship to get group category is in.
|
||||
group = category.category_group
|
||||
if group is None:
|
||||
await interaction.response.send_message(
|
||||
(
|
||||
f"An error with {category.name} and group relationship. Contact developer. "
|
||||
"Is_ascending was still updated."
|
||||
),
|
||||
ephemeral=True,
|
||||
)
|
||||
agon_logger.error(f"{category.name}:{category.id} group relationship was None.")
|
||||
|
||||
stmt = select(CategoryGroup).where(col(CategoryGroup.id) == group_id)
|
||||
group = session.scalar(stmt)
|
||||
if group is None:
|
||||
await interaction.response.send_message("Group was not found.", ephemeral=True)
|
||||
return
|
||||
|
||||
await send_highscore_message(session, interaction.guild, group)
|
||||
@@ -191,11 +190,15 @@ class SetCog(commands.Cog, name="Set command."):
|
||||
.where(col(CategoryGroup.id) == int(group_id))
|
||||
)
|
||||
group = session.scalar(stmt)
|
||||
if group is None:
|
||||
await interaction.response.send_message("Group was not found.", ephemeral=True)
|
||||
return
|
||||
group.PadLength = length
|
||||
session.commit()
|
||||
await interaction.response.send_message(
|
||||
f"Category pad length set to {length} for {group.name}", ephemeral=True
|
||||
)
|
||||
await send_highscore_message(session, interaction.guild, group)
|
||||
|
||||
@group.subcommand(
|
||||
description="Registers the channel for submission messages. Currently this information is deprecated."
|
||||
|
||||
Reference in New Issue
Block a user