Don't send non-interval disabled reminders
Skip the sending logic as some users use disabled one-time reminders as presets
This commit is contained in:
parent
7b6e967a5d
commit
25b84880a5
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -2068,7 +2068,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
|
||||
|
||||
[[package]]
|
||||
name = "reminder_rs"
|
||||
version = "1.6.2"
|
||||
version = "1.6.3"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"chrono",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "reminder_rs"
|
||||
version = "1.6.2"
|
||||
version = "1.6.3"
|
||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||
edition = "2018"
|
||||
|
||||
|
@ -157,4 +157,9 @@ CREATE TABLE events (
|
||||
FOREIGN KEY (reminder_id) REFERENCES reminders_new(id) ON DELETE SET NULL
|
||||
);
|
||||
|
||||
DROP TABLE reminders;
|
||||
DROP TABLE embed_fields;
|
||||
RENAME TABLE reminders_new TO reminders;
|
||||
RENAME TABLE embed_fields_new TO embed_fields;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
@ -301,8 +301,13 @@ WHERE
|
||||
ON reminders.channel_id = channels.id
|
||||
WHERE reminders.`utc_time` < NOW()
|
||||
GROUP BY channels.guild_id
|
||||
) AND
|
||||
reminders.`utc_time` < NOW()"#,
|
||||
)
|
||||
AND reminders.`utc_time` < NOW()
|
||||
AND (
|
||||
reminders.`interval_seconds` IS NOT NULL
|
||||
OR reminders.`interval_months` IS NOT NULL
|
||||
OR reminders.enabled
|
||||
)"#,
|
||||
)
|
||||
.fetch_all(pool)
|
||||
.await
|
||||
|
Loading…
Reference in New Issue
Block a user