diff --git a/commands.go b/commands.go index ca3d5a6..6fbc74b 100644 --- a/commands.go +++ b/commands.go @@ -88,6 +88,7 @@ func listVehicles(m chat1.MsgSummary) { func deferTime(m chat1.MsgSummary) { parts := strings.Split(m.Content.Text.Body, " ") t := parts[1] + start := time.Now() command := strings.Join(parts[2:], " ") m.Content.Text.Body = fmt.Sprintf("!%+v", command) timer, err := time.ParseDuration(t) @@ -97,8 +98,9 @@ func deferTime(m chat1.MsgSummary) { log.LogError("%+v: %+v", tracker, err) return } - k.SendMessageByConvID(m.ConvID, fmt.Sprintf("I will run %+v at %+v", command, time.Now().Add(timer).Format("Jan _2 15:04:05"))) + k.SendMessageByConvID(m.ConvID, fmt.Sprintf("I will run `%+v` at %+v", command, time.Now().Add(timer).Format("Jan _2 15:04:05"))) time.Sleep(timer) + k.SendMessageByConvID(m.ConvID, fmt.Sprintf("Running `%+v` from %+v", command, start.Format("Jan _2 15:04:05"))) handleChat(m) }