Close #49
This commit is contained in:
parent
f48a4b827f
commit
dd88f7fbee
1 changed files with 5 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue