From ec8ce42abb3e488c1925aff50c0bec16aacfc40f Mon Sep 17 00:00:00 2001 From: Robert Uhl Date: Wed, 20 Feb 2019 14:16:55 -0500 Subject: [PATCH] Add example text for time parse errors --- plugins/reminder/reminder.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/reminder/reminder.go b/plugins/reminder/reminder.go index 26078a8..715ba68 100644 --- a/plugins/reminder/reminder.go +++ b/plugins/reminder/reminder.go @@ -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 }