Corrected autofill function return structures.

This commit is contained in:
alwayscompiling
2022-12-02 16:32:22 -05:00
parent 14602282e9
commit 4e832a084f
4 changed files with 35 additions and 30 deletions
+4 -4
View File
@@ -2,7 +2,7 @@
Commands for managing/displaying the highscores messages.
"""
from typing import Optional
from typing import Optional, Union
import nextcord
from nextcord.ext import commands
@@ -115,20 +115,20 @@ class MessageManagementCog(commands.Cog, name="Message Management"):
async def refresh_group(
self,
interaction: nextcord.Interaction,
group_id: int = nextcord.SlashOption(description="Name of table.", required=True),
group_id: str = nextcord.SlashOption(description="Name of table.", required=True),
) -> None:
"""
Refreshes a table given by user.
Args:
interaction (nextcord.Interaction): Interaction that invoked the command.
group_id (int): Group id to refresh. Is SlashOption.
group_id (str): Str representation of Group id to refresh. Is SlashOption.
"""
stmt = (
select(CategoryGroup)
.where(CategoryGroup.GuildId == interaction.guild_id)
.where(CategoryGroup.GroupId == group_id)
.where(CategoryGroup.GroupId == int(group_id))
)
group = session.scalar(stmt)