fix(moderation): hopefully fixed the duration checker
All checks were successful
Pylint / Pylint (push) Successful in 1m12s
All checks were successful
Pylint / Pylint (push) Successful in 1m12s
This commit is contained in:
parent
d3951f6548
commit
9db783ddc2
1 changed files with 2 additions and 2 deletions
|
@ -200,9 +200,9 @@ class Moderation(commands.Cog):
|
|||
try:
|
||||
parsed_time = parse(sval=duration, as_timedelta=True, raise_exception=True)
|
||||
except ValueError:
|
||||
await ctx.message.reply(f"Please provide a valid duration!\nSee `{ctx.prefix}tdc`")
|
||||
await ctx.send(f"Please provide a valid duration!\nSee `{ctx.prefix}tdc`")
|
||||
return
|
||||
if parsed_time.days > 28:
|
||||
if parsed_time.microseconds > 2.419e+12:
|
||||
await ctx.send("Please provide a duration that is less than 28 days.")
|
||||
return
|
||||
await target.timeout(parsed_time)
|
||||
|
|
Loading…
Reference in a new issue