From e53e305653e2416d99044d40d6f1d516bc5ae87b Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sun, 13 Mar 2016 09:55:48 -0400 Subject: [PATCH] Change ID from nullable field to its value --- plugins/factoid.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/factoid.go b/plugins/factoid.go index dbf5da0..dbb633e 100644 --- a/plugins/factoid.go +++ b/plugins/factoid.go @@ -373,7 +373,7 @@ func (p *FactoidPlugin) tellThemWhatThatWas(message bot.Message) bool { msg = "Nope." } else { msg = fmt.Sprintf("That was (#%d) '%s <%s> %s'", - fact.id, fact.fact, fact.verb, fact.tidbit) + fact.id.Int64, fact.fact, fact.verb, fact.tidbit) } p.Bot.SendMessage(message.Channel, msg) return true @@ -435,7 +435,7 @@ func (p *FactoidPlugin) forgetLastFact(message bot.Message) bool { if err != nil { log.Println("Error removing fact: ", p.LastFact, err) } - fmt.Printf("Forgot #%d: %s %s %s\n", p.LastFact.id, p.LastFact.fact, + fmt.Printf("Forgot #%d: %s %s %s\n", p.LastFact.id.Int64, p.LastFact.fact, p.LastFact.verb, p.LastFact.tidbit) p.Bot.SendAction(message.Channel, "hits himself over the head with a skillet") p.LastFact = nil