Add example text for time parse errors

This commit is contained in:
Robert Uhl 2019-02-20 14:16:55 -05:00 committed by GitHub
parent f62c852eb4
commit ec8ce42abb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ func (p *ReminderPlugin) message(kind bot.Kind, message msg.Message, args ...int
dur, err := time.ParseDuration(parts[3])
if err != nil {
p.Bot.Send(bot.Message, channel, "Easy cowboy, not sure I can parse that duration.")
p.Bot.Send(bot.Message, channel, "Easy cowboy, not sure I can parse that duration. Try something like '1.5h' or '2h45m'.")
return true
}
@ -116,7 +116,7 @@ func (p *ReminderPlugin) message(kind bot.Kind, message msg.Message, args ...int
//remind who every dur for dur2 blah
dur2, err := time.ParseDuration(parts[5])
if err != nil {
p.Bot.Send(bot.Message, channel, "Easy cowboy, not sure I can parse that duration.")
p.Bot.Send(bot.Message, channel, "Easy cowboy, not sure I can parse that duration. Try something like '1.5h' or '2h45m'.")
return true
}