diff --git a/moderation/moderation.py b/moderation/moderation.py index 935794c..a010998 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -326,7 +326,7 @@ class Moderation(commands.Cog): await target.send(embed=embed) except discord.errors.HTTPException: pass - await interaction.guild.ban(target.id, reason=f"Banned by {interaction.user.id} for: {reason}", delete_message_seconds=delete_messages) + await interaction.guild.ban(target, reason=f"Banned by {interaction.user.id} for: {reason}", delete_message_seconds=delete_messages) await self.mysql_log(interaction.guild.id, interaction.user.id, 'BAN', target.id, 'NULL', reason) @app_commands.command(name="unban") @@ -338,9 +338,9 @@ class Moderation(commands.Cog): await interaction.response.send_message(content=f"{target.mention} is not banned!", ephemeral=True) return if reason: - await interaction.guild.unban(target.id, reason=f"Unbanned by {interaction.user.id} for: {reason}") + await interaction.guild.unban(target, reason=f"Unbanned by {interaction.user.id} for: {reason}") else: - await interaction.guild.unban(target.id, reason=f"Unbanned by {interaction.user.id}") + await interaction.guild.unban(target, reason=f"Unbanned by {interaction.user.id}") reason = "No reason given." await interaction.response.send_message(content=f"{target.mention} has been unbanned!\n**Reason** - `{reason}`") try: