Clarify optional SlashOptions

This commit is contained in:
alwayscompiling
2022-12-02 15:28:53 -05:00
parent 2e3f298036
commit 14602282e9
2 changed files with 12 additions and 16 deletions
+3 -3
View File
@@ -48,7 +48,7 @@ class MessageManagementCog(commands.Cog, name="Message Management"):
Args:
interaction (nextcord.Interaction): Interaction that invoked the command
channel (Optional[nextcord.abc.GuildChannel], optional): Channel to clear of messages.
channel (Optional[nextcord.abc.GuildChannel]): Channel to clear of messages.
Is a SlashOption. Limited to text channels. Defaults to None.
"""
@@ -115,14 +115,14 @@ class MessageManagementCog(commands.Cog, name="Message Management"):
async def refresh_group(
self,
interaction: nextcord.Interaction,
group_id: Optional[int] = nextcord.SlashOption(description="Name of table.", required=True),
group_id: int = 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 (Optional[int]): Group id to refresh. Not optional. Is SlashOption.
group_id (int): Group id to refresh. Is SlashOption.
"""
stmt = (