Skip to content

Commit

Permalink
Delete old repeating reminders first, then make the new one to hopefu…
Browse files Browse the repository at this point in the history
…lly avoid edge cases where reminders aren't sent
  • Loading branch information
NoComment1105 committed Sep 15, 2022
1 parent 4536e4c commit b522b8e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ class Reminders : Extension() {

// Remove the old reminder from the database
if (it.repeating) {
RemindMeCollection().removeReminder(it.guildId, it.userId, it.id)
RemindMeCollection().setReminder(
Clock.System.now(),
it.guildId,
Expand All @@ -773,7 +774,6 @@ class Reminders : Extension() {
it.repeatingInterval,
it.id
)
RemindMeCollection().removeReminder(it.guildId, it.userId, it.id)
} else {
RemindMeCollection().removeReminder(it.guildId, it.userId, it.id)
}
Expand Down

0 comments on commit b522b8e

Please sign in to comment.