diff --git a/discord_reminder_bot/main.py b/discord_reminder_bot/main.py index ab6a11e..8978842 100644 --- a/discord_reminder_bot/main.py +++ b/discord_reminder_bot/main.py @@ -41,9 +41,10 @@ def calc_countdown(job) -> str: str: Returns days, hours and minutes till reminder. Returns "Failed to calculate time" if no job is found. """ - trigger_time = ( - job.trigger.run_date if type(job.trigger) is DateTrigger else job.next_run_time - ) + if type(job.trigger) is DateTrigger: + trigger_time = job.trigger.run_date + else: + trigger_time = job.next_run_time # Get_job() returns None when it can't find a job with that id. if trigger_time is None: