Skip to content

Commit b60ddbe

Browse files
committed
fix: parsing
1 parent b6d7431 commit b60ddbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cogs/modmail.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,8 +2336,8 @@ async def snooze(self, ctx, *, duration: UserFriendlyTime = None):
23362336
default_snooze = 604800
23372337
else:
23382338
try:
2339-
default_snooze = int((ShortTime(str(default_snooze)).dt - ShortTime("0s").dt).total_seconds())
2340-
except Exception:
2339+
default_snooze = int(default_snooze)
2340+
except (ValueError, TypeError):
23412341
default_snooze = 604800
23422342
if duration:
23432343
snooze_for = int((duration.dt - duration.now).total_seconds())

0 commit comments

Comments
 (0)