diff --git a/src/cogs/birthday.py b/src/cogs/birthday.py index 94986ab..23bb757 100644 --- a/src/cogs/birthday.py +++ b/src/cogs/birthday.py @@ -238,7 +238,13 @@ class Birthday(commands.Cog): @app_commands.checks.bot_has_permissions(embed_links=True) @app_commands.checks.cooldown(1, 5) @birthday_group.command(name="sett", description="Lagrer din bursdag i databasen") - async def birthday_set(self, interaction: discord.Interaction, dag: int, måned: int, år: int): + async def birthday_set( + self, + interaction: discord.Interaction, + dag: app_commands.Range[int, 1, 31], + måned: app_commands.Range[int, 1, 12], + år: int, + ): """ Allows the user to set their birthday in the database. diff --git a/src/cogs/misc.py b/src/cogs/misc.py index 2c290bd..4561787 100644 --- a/src/cogs/misc.py +++ b/src/cogs/misc.py @@ -162,7 +162,12 @@ class Misc(commands.Cog): @app_commands.checks.bot_has_permissions(embed_links=True) @app_commands.checks.cooldown(1, 2) @app_commands.command(name="mock", description="vEt dU iKkE hVa mOcKtEkSt eR eLlEr?") - async def mock(self, interation: discord.Interaction, tekst: str, bruker: discord.User | None = None): + async def mock( + self, + interation: discord.Interaction, + tekst: app_commands.Range[str, 1, 4096], + bruker: discord.User | None = None, + ): """ dO i rEaLlY nEeD tO eXpLaIn?? @@ -195,7 +200,9 @@ class Misc(commands.Cog): @app_commands.checks.bot_has_permissions(embed_links=True) @app_commands.checks.cooldown(1, 5) @app_commands.command(name="helligdager", description="Se helligdager i et land for et år") - async def holidays(self, interaction: discord.Interaction, *, land: str = "NO", år: int = None): + async def holidays( + self, interaction: discord.Interaction, *, land: app_commands.Range[str, 2, 2] = "NO", år: int = None + ): """ Get holidays for a country for a given year diff --git a/src/cogs/tempvoice.py b/src/cogs/tempvoice.py index c3afb6b..efc2793 100644 --- a/src/cogs/tempvoice.py +++ b/src/cogs/tempvoice.py @@ -31,7 +31,12 @@ class TempVoice(commands.Cog): @app_commands.checks.bot_has_permissions(manage_channels=True, embed_links=True) @app_commands.checks.cooldown(1, 300) @app_commands.command(name="tempvoice") - async def tempvoice(self, interaction: discord.Interaction, name: str, limit: int = 0): + async def tempvoice( + self, + interaction: discord.Interaction, + name: app_commands.Range[str, 1, 100], + limit: app_commands.Range[int, 0, 99] = 0, + ): """ Create a temporary voice channel @@ -39,7 +44,7 @@ class TempVoice(commands.Cog): ---------- interaction (discord.Interaction): The interaction object name (str): The name of the channel - limit (int): The user limit of the channel + limit (int): The user limit of the channel. 0 means no limit """ channel = await self.temp_voice_helper.create_temp_voice(interaction, name, limit)