Skip to content

Commit

Permalink
code trace for blocked issue modmail-dev#3131
Browse files Browse the repository at this point in the history
  • Loading branch information
TJZine committed May 1, 2022
1 parent 8cfca1c commit 8b4df4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cogs/modmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,7 @@ async def blocked(self, ctx):
print("Now Date Object:")
print(type(now))
print(now)
print(now.timetz())

blocked_users = list(self.bot.blocked_users.items())
for id_, reason in blocked_users:
Expand All @@ -1488,7 +1489,9 @@ async def blocked(self, ctx):
)

if end_time is not None:
print("datatime.fromisoformat: ")
print(datetime.fromisoformat(end_time.group(1)))
print(datetime.fromisoformat(end_time.group(1)).timetz())
after = (datetime.fromisoformat(end_time.group(1)) - now).total_seconds()
if after <= 0:
# No longer blocked
Expand Down

0 comments on commit 8b4df4d

Please sign in to comment.