Compare commits
2 Commits
fc02eaea4a
...
06e1474396
Author | SHA1 | Date | |
---|---|---|---|
06e1474396 | |||
|
adb9c728f4 |
@ -114,6 +114,8 @@ pub async fn offset(
|
|||||||
#[description = "Number of minutes to offset by"] minutes: Option<isize>,
|
#[description = "Number of minutes to offset by"] minutes: Option<isize>,
|
||||||
#[description = "Number of seconds to offset by"] seconds: Option<isize>,
|
#[description = "Number of seconds to offset by"] seconds: Option<isize>,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
|
ctx.defer().await?;
|
||||||
|
|
||||||
let combined_time = hours.map_or(0, |h| h * HOUR as isize)
|
let combined_time = hours.map_or(0, |h| h * HOUR as isize)
|
||||||
+ minutes.map_or(0, |m| m * MINUTE as isize)
|
+ minutes.map_or(0, |m| m * MINUTE as isize)
|
||||||
+ seconds.map_or(0, |s| s);
|
+ seconds.map_or(0, |s| s);
|
||||||
|
Loading…
Reference in New Issue
Block a user