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]]
|
[[package]]
|
||||||
name = "reminder_rs"
|
name = "reminder_rs"
|
||||||
version = "1.6.2"
|
version = "1.6.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"chrono",
|
"chrono",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "reminder_rs"
|
name = "reminder_rs"
|
||||||
version = "1.6.2"
|
version = "1.6.3"
|
||||||
authors = ["jellywx <judesouthworth@pm.me>"]
|
authors = ["jellywx <judesouthworth@pm.me>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -157,4 +157,9 @@ CREATE TABLE events (
|
|||||||
FOREIGN KEY (reminder_id) REFERENCES reminders_new(id) ON DELETE SET NULL
|
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;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
@ -301,8 +301,13 @@ WHERE
|
|||||||
ON reminders.channel_id = channels.id
|
ON reminders.channel_id = channels.id
|
||||||
WHERE reminders.`utc_time` < NOW()
|
WHERE reminders.`utc_time` < NOW()
|
||||||
GROUP BY channels.guild_id
|
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)
|
.fetch_all(pool)
|
||||||
.await
|
.await
|
||||||
|
Loading…
Reference in New Issue
Block a user