Merge pull request #17 from chrissexton/fix-what-was-format

Change ID from nullable field to its value
This commit is contained in:
Chris Sexton 2016-03-13 10:14:43 -04:00
commit 92aa5a1214
1 changed files with 2 additions and 2 deletions

View File

@ -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