fix(moderation): added a check to mute that prevents a discord api hour from timing someone out for longer than 28 days
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
All checks were successful
Pylint / Pylint (push) Successful in 1m13s
This commit is contained in:
parent
0deb589198
commit
d3951f6548
1 changed files with 3 additions and 0 deletions
|
@ -202,6 +202,9 @@ class Moderation(commands.Cog):
|
|||
except ValueError:
|
||||
await ctx.message.reply(f"Please provide a valid duration!\nSee `{ctx.prefix}tdc`")
|
||||
return
|
||||
if parsed_time.days > 28:
|
||||
await ctx.send("Please provide a duration that is less than 28 days.")
|
||||
return
|
||||
await target.timeout(parsed_time)
|
||||
response = await ctx.send(content=f"{target.mention} has been muted for {humanize.precisedelta(parsed_time)}!\n**Reason** - `{reason}`")
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue