Fix quick code smell.

This commit is contained in:
2025-02-26 20:42:44 -05:00
parent 6a26440c4d
commit 8870d93a44
+5 -4
View File
@@ -97,10 +97,9 @@ class CreateCog(commands.Cog, name="Create Cog"):
min_value=1,
max_value=30,
),
channel: nextcord.abc.GuildChannel | None = nextcord.SlashOption(
channel: nextcord.TextChannel | None = nextcord.SlashOption(
description="Channel to post Group in. If left empty, defaults to current channel.",
required=False,
channel_types=[nextcord.ChannelType.text],
default=None,
),
) -> None:
@@ -119,11 +118,13 @@ class CreateCog(commands.Cog, name="Create Cog"):
"""
# if no channel provided, use current channel.
if channel is None:
channel = interaction.channel
channel_id: int = interaction.channel.id
else:
channel_id: int = channel.id
new_group = CategoryGroup(
GroupName=group_name,
ChannelId=channel.id,
ChannelId=channel_id,
GuildId=interaction.guild_id,
PadLength=pad_length,
UsernameLength=username_length,