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"
|
user_message += f"\nDuration: {duration} hours"
|
||||||
expiry = time + timedelta(hours=duration)
|
expiry = time + timedelta(hours=duration)
|
||||||
|
|
||||||
await user.send(user_message)
|
try:
|
||||||
await ctx.guild.ban(user, reason=reason)
|
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)
|
||||||
if mtype == "soft":
|
if mtype == "soft":
|
||||||
await ctx.guild.unban(user, reason="Ban was softban")
|
await ctx.guild.unban(user, reason="Ban was softban")
|
||||||
await ctx.send(
|
await ctx.send(
|
||||||
|
|
Loading…
Add table
Reference in a new issue