diff --git a/plugins/fact/fact.go b/plugins/fact/fact.go index 2b43721..5a32a39 100644 --- a/plugins/fact/fact.go +++ b/plugins/fact/fact.go @@ -50,6 +50,9 @@ func findAlias(db *sqlx.DB, fact string) (bool, *Factoid) { return false, nil } f, err := a.resolve(db) + if err != nil { + log.Error().Err(err).Msg("findAlias") + } return err == nil, f } diff --git a/plugins/fact/factoid.go b/plugins/fact/factoid.go index a5cbbe5..d4098e8 100644 --- a/plugins/fact/factoid.go +++ b/plugins/fact/factoid.go @@ -157,6 +157,7 @@ func (p *FactoidPlugin) findTrigger(fact string) (bool, *Factoid) { f, err := GetSingleFact(p.db, fact) if err != nil { + log.Error().Err(err).Msg("GetSingleFact") return findAlias(p.db, fact) } return true, f @@ -465,7 +466,6 @@ func (p *FactoidPlugin) register() { log.Debug().Msgf("Message: %+v", r) - // This plugin has no business with normal messages if !message.Command { // look for any triggers in the db matching this message return p.trigger(c, message)