From 3598973fac3dbc10c98cd601c646ef6f4f7954d1 Mon Sep 17 00:00:00 2001 From: jellywx Date: Mon, 4 Jan 2021 18:33:28 +0000 Subject: [PATCH] expiring reminders working --- src/commands/reminder_cmds.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/commands/reminder_cmds.rs b/src/commands/reminder_cmds.rs index 9afd431..a77b750 100644 --- a/src/commands/reminder_cmds.rs +++ b/src/commands/reminder_cmds.rs @@ -1141,7 +1141,9 @@ async fn remind_command(ctx: &Context, msg: &Message, args: String, command: Rem .get(&language, err.to_response()) .replace("{error}", &s), - _ => lm.get(&language, err.to_response()).to_string(), + _ => lm + .get(&language, err.to_response()) + .replace("{min_interval}", &*MIN_INTERVAL.to_string()), }) .collect::>() .join("\n") @@ -1552,7 +1554,7 @@ INSERT INTO messages (content, tts, attachment, attachment_name) VALUES (?, ?, ? INSERT INTO reminders (uid, message_id, channel_id, time, expires, `interval`, method, set_by) VALUES (?, (SELECT id FROM messages WHERE content = ? ORDER BY id DESC LIMIT 1), - ?, ?, ?, ?, 'remind', + ?, ?, FROM_UNIXTIME(?), ?, 'remind', (SELECT id FROM users WHERE user = ? LIMIT 1)) ", generate_uid(),