mirror of https://github.com/velour/catbase.git
Change ID from nullable field to its value
This commit is contained in:
parent
624d96a10c
commit
e53e305653
|
@ -373,7 +373,7 @@ func (p *FactoidPlugin) tellThemWhatThatWas(message bot.Message) bool {
|
||||||
msg = "Nope."
|
msg = "Nope."
|
||||||
} else {
|
} else {
|
||||||
msg = fmt.Sprintf("That was (#%d) '%s <%s> %s'",
|
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)
|
p.Bot.SendMessage(message.Channel, msg)
|
||||||
return true
|
return true
|
||||||
|
@ -435,7 +435,7 @@ func (p *FactoidPlugin) forgetLastFact(message bot.Message) bool {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Error removing fact: ", p.LastFact, err)
|
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.LastFact.verb, p.LastFact.tidbit)
|
||||||
p.Bot.SendAction(message.Channel, "hits himself over the head with a skillet")
|
p.Bot.SendAction(message.Channel, "hits himself over the head with a skillet")
|
||||||
p.LastFact = nil
|
p.LastFact = nil
|
||||||
|
|
Loading…
Reference in New Issue