移动位置

This commit is contained in:
Suika 2021-07-01 15:39:34 +08:00 committed by GitHub
parent b12147c598
commit fde6e9c278

View File

@ -1,4 +1,4 @@
package fensi package plugin_diana
import ( import (
"github.com/robfig/cron" "github.com/robfig/cron"
@ -14,10 +14,10 @@ func init() {
}) })
} }
// 定时任务每天凌晨0点执行一次 // 定时任务每天晚上最后2分钟执行一次
func FansDaily(groupID int64) { func FansDaily(groupID int64) {
c := cron.New() c := cron.New()
c.AddFunc("0 0 0 * * ?", func() { fansData(groupID) }) c.AddFunc("0 58 23 * * ?", func() { fansData(groupID) })
c.Start() c.Start()
} }
@ -34,7 +34,7 @@ func fansData(groupID int64) {
ctx.SendGroupMessage( ctx.SendGroupMessage(
groupID, groupID,
message.Text( message.Text(
dataStamp(), " Asoul全团粉丝日报如下", "\n\n", time.Now().Format("2006-01-02"), " Asoul全团粉丝日报如下", "\n\n",
"uid: ", diana.Mid, "\n", "uid: ", diana.Mid, "\n",
"名字: ", diana.Uname, "\n", "名字: ", diana.Uname, "\n",
"当前粉丝数: ", diana.Follower, "\n", "当前粉丝数: ", diana.Follower, "\n",