Skip to content

Commit

Permalink
await unawaited subroutine
Browse files Browse the repository at this point in the history
fun reminder error message
  • Loading branch information
Mole1424 committed Oct 9, 2023
1 parent ab8c502 commit 1ee02b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cogs/commands/event_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async def event(self, ctx: Context, days: int = 7, logging: bool = False):
)
print(ev.get("summary"), t, before)
if t < now:
self.log_event(ctx, ev, t, logging, "in the past")
await self.log_event(ctx, ev, t, logging, "in the past")
continue
if t > before:
await self.log_event(ctx, ev, t, logging, "outside time frme")
Expand Down
5 changes: 4 additions & 1 deletion cogs/commands/reminders.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ async def add(self, ctx: Context, when: str, *, reminder_content: str):
def add_base(self, reminder):
now = datetime.now(timezone("Europe/London"))
if not reminder.trigger_at:
return {"content": "Incorrect time format, please see help text."}
return {
"content": "I just flat out did not understand what you meant with that time"
}
# thanks carl bot for this lovely error message :)
elif reminder.trigger_at < now:
return {"content": "That time is in the past."}

Expand Down

0 comments on commit 1ee02b3

Please sign in to comment.