From adb9c728f4d217b55597e3c03350b1bbcf45ccba Mon Sep 17 00:00:00 2001 From: jude Date: Mon, 6 Nov 2023 16:57:50 +0000 Subject: [PATCH] Defer offset response --- Cargo.toml | 2 +- src/commands/reminder_cmds.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ad16ad6..a9296b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder-rs" -version = "1.6.47" +version = "1.6.48" authors = ["Jude Southworth "] edition = "2021" license = "AGPL-3.0 only" diff --git a/src/commands/reminder_cmds.rs b/src/commands/reminder_cmds.rs index 05a4826..d1139e9 100644 --- a/src/commands/reminder_cmds.rs +++ b/src/commands/reminder_cmds.rs @@ -114,6 +114,8 @@ pub async fn offset( #[description = "Number of minutes to offset by"] minutes: Option, #[description = "Number of seconds to offset by"] seconds: Option, ) -> Result<(), Error> { + ctx.defer().await?; + let combined_time = hours.map_or(0, |h| h * HOUR as isize) + minutes.map_or(0, |m| m * MINUTE as isize) + seconds.map_or(0, |s| s); -- 2.25.1