From 35d7201500a23c08ed01dccf1052f7e258b8ea7a Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Tue, 15 Aug 2017 00:40:47 +0200 Subject: [PATCH] Use go-humanize for somewhat nicer duration output. --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0db5235..48baa72 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,7 @@ import ( "net/http" + "github.com/dustin/go-humanize" "github.com/icedream/go-footballdata" "github.com/olekukonko/tablewriter" "github.com/thoj/go-ircevent" @@ -412,7 +413,7 @@ func main() { cmd := parseCommand(msg) log.Printf("Antispam check: %s, %s", event.Source, cmd.Name) if ok, duration := antispamInstance.Check(event.Source, cmd.Name); !ok { - conn.Noticef(sender, "Sorry, you need to wait %s before you can use this command again!", duration) + conn.Noticef(sender, "Sorry, please try again %s.", humanize.Time(time.Now().Add(duration))) return }