mirror of https://github.com/velour/catbase.git
Moved sleep back to the beginning of the for so that he wouldn't spit beers out too quickly on start
This commit is contained in:
parent
62bef551a6
commit
a05252a2b0
|
@ -322,6 +322,8 @@ func (p *BeersPlugin) checkUntappd(channel string) {
|
||||||
// users := []string{"Tir"}
|
// users := []string{"Tir"}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
|
time.Sleep(time.Duration(frequency) * time.Second)
|
||||||
|
|
||||||
var users []untappdUser
|
var users []untappdUser
|
||||||
p.Coll.Find(bson.M{"untappduser": bson.M{"$exists": true}}).All(&users)
|
p.Coll.Find(bson.M{"untappduser": bson.M{"$exists": true}}).All(&users)
|
||||||
|
|
||||||
|
@ -352,7 +354,5 @@ func (p *BeersPlugin) checkUntappd(channel string) {
|
||||||
p.Bot.SendMessage(channel, msg)
|
p.Bot.SendMessage(channel, msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
time.Sleep(time.Duration(frequency) * time.Second)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue