Corrected autofill function return structures.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user