start irc module

This commit is contained in:
Jay
2018-09-12 18:07:49 +08:00
parent f29f982f7f
commit f224c77bac
19 changed files with 1296 additions and 0 deletions
+1
View File
@@ -11,5 +11,6 @@ func SetBackground() {
c = cron.New()
c.AddFunc("0 * * * * *", readFacebookPage)
c.AddFunc("*/20 * * * * *", getStreamStatus)
c.AddFunc("*/5 * * * * *", checkOpay)
c.Start()
}
+21
View File
@@ -0,0 +1,21 @@
package background
import (
"git.trj.tw/golang/mtfosbot/model"
)
func checkOpay() {
channels, err := model.GetAllTwitchChannel()
if err != nil {
return
}
for _, v := range channels {
if len(v.OpayID) > 0 && v.Join {
go getOpayData(v)
}
}
}
func getOpayData(ch *model.TwitchChannel) {
}