diff --git a/plugins/first.go b/plugins/first.go index 9520ccf..5b3158d 100644 --- a/plugins/first.go +++ b/plugins/first.go @@ -29,9 +29,12 @@ type FirstEntry struct { func NewFirstPlugin(b *bot.Bot) *FirstPlugin { coll := b.Db.C("first") var firsts []FirstEntry - query := bson.M{"day": midnight(time.Now().UTC())} + query := bson.M{"day": midnight(time.Now())} + log.Println("Day:", midnight(time.Now())) coll.Find(query).All(&firsts) + log.Println("FIRSTS:", firsts) + var first *FirstEntry if len(firsts) > 0 { first = &firsts[0]