Compare commits

...

2 Commits

Author SHA1 Message Date
06e1474396 Merge pull request 'Defer offset response' (#2) from jude/fix-offset into current
Reviewed-on: #2
2023-11-06 17:35:27 +00:00
jude
adb9c728f4 Defer offset response 2023-11-06 16:57:50 +00:00

View File

@ -114,6 +114,8 @@ pub async fn offset(
#[description = "Number of minutes to offset by"] minutes: Option<isize>,
#[description = "Number of seconds to offset by"] seconds: Option<isize>,
) -> 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);