🐛 Fix typo which causes crash
Some checks failed
ci / docker (push) Successful in 4m55s
Python formatting PEP8 / Python-PEP8 (push) Failing after 18s

This commit is contained in:
Finn Christiansen 2024-06-17 07:37:14 +02:00
parent 1f1ae5077e
commit f25cd833f8

View file

@ -120,7 +120,7 @@ async def set_reminder(room, message) -> None:
response = "You did not set your location yet." response = "You did not set your location yet."
await bot.api.send_markdown_message(room.room_id, response) await bot.api.send_markdown_message(room.room_id, response)
else: else:
user.reminder_time_in_minues = minutes user.reminder_time_in_minutes = minutes
user.room_id = room.room_id user.room_id = room.room_id
response = "Your reminder was set to {} minutes before praying.".format(minutes) response = "Your reminder was set to {} minutes before praying.".format(minutes)
schedule_reminder(username) schedule_reminder(username)
@ -151,7 +151,7 @@ def schedule_reminder(username) -> None:
# schedule praying times but skip the ones which already have been passed today # schedule praying times but skip the ones which already have been passed today
seconds = int((praying_time - now).total_seconds()) seconds = int((praying_time - now).total_seconds())
message = "{} is at {}".format(prayer, praying_time.strftime("%H:%M")) message = "{} is at {}".format(prayer, praying_time.strftime("%H:%M"))
asyncio.ensure_future(remind(username, message, seconds - user.reminder_time_in_minues * 60)) asyncio.ensure_future(remind(username, message, seconds - user.reminder_time_in_minutes * 60))
# save date of last schedule for user # save date of last schedule for user