diff --git a/aurora/aurora.py b/aurora/aurora.py index 64af9b7..3ac645b 100644 --- a/aurora/aurora.py +++ b/aurora/aurora.py @@ -411,7 +411,7 @@ class Aurora(commands.Cog): Choice(name='3 Days', value=259200), Choice(name='7 Days', value=604800), ]) - async def ban(self, interaction: discord.Interaction, target: discord.User, reason: str, duration: str = None, delete_messages: Choice[int] = 0, silent: bool = None): + async def ban(self, interaction: discord.Interaction, target: discord.User, reason: str, duration: str = None, delete_messages: Choice[int] = None, silent: bool = None): """Ban a user. Parameters @@ -429,6 +429,11 @@ class Aurora(commands.Cog): if not await check_moddable(target, interaction, ['ban_members']): return + if delete_messages is None: + delete_messages = 0 + else: + delete_messages = delete_messages.value + try: await interaction.guild.fetch_ban(target) await interaction.response.send_message(content=f"{target.mention} is already banned!", ephemeral=True)