diff --git a/core/cast.go b/core/cast.go new file mode 100644 index 0000000..f2bb73e --- /dev/null +++ b/core/cast.go @@ -0,0 +1,25 @@ +package core + +import ( + "time" + + "github.com/beego/beego/v2/adapter/httplib" +) + +var channels = []string{} + +func init() { + go func() { + time.Sleep(time.Second * 20) + for { + for _, channel := range channels { + msg, _ := httplib.Get(channel).String() + if msg != "" && sillyGirl.Get(channel) != msg { + NotifyMasters(msg) + sillyGirl.Set(channel, msg) + } + } + time.Sleep(time.Minute) + } + }() +}