Change ID from nullable field to its value

This commit is contained in:
Chris Sexton 2016-03-13 09:55:48 -04:00
parent 624d96a10c
commit e53e305653
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