From a05702c2be47206c943e86645692690bde79dd9f Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 14 Nov 2023 13:37:07 +1100 Subject: [PATCH] log: Try to find error of not sending reminder --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 1749cb9..e5d28db 100644 --- a/bot.py +++ b/bot.py @@ -469,6 +469,7 @@ async def remindme(ctx, when: str, reminder: str): await ctx.response.send_message("Invalid time format. Please use something like `1d 3h` or `4hr`.",ephemeral=True) async def check_reminders(): + print("Checking reminders", flush=True) now = datetime.datetime.now() reminders = read_reminders() @@ -477,8 +478,8 @@ async def check_reminders(): if reminder_time <= now: user = await client.fetch_user(int(reminder['user_id'])) await user.send("G'day,\nI need to remind you of:\n" + reminder['text']) + print("Reminder sent", flush=True) reminders.remove(reminder) - write_reminders(reminders)