diff --git a/jarvis/cogs/admin.py b/jarvis/cogs/admin.py index 9f04a47..d2f9b9b 100644 --- a/jarvis/cogs/admin.py +++ b/jarvis/cogs/admin.py @@ -106,8 +106,12 @@ class AdminCog(commands.Cog): user_message += f"\nDuration: {duration} hours" expiry = time + timedelta(hours=duration) + try: + await ctx.guild.ban(user, reason=reason) + except Exception as e: + await ctx.send(f"Failed to ban user:\n```\n{e}\n```", hidden=True) + return await user.send(user_message) - await ctx.guild.ban(user, reason=reason) if mtype == "soft": await ctx.guild.unban(user, reason="Ban was softban") await ctx.send(