有指针错误

This commit is contained in:
2022-07-19 12:09:44 +08:00
parent 569e303a74
commit 39b4f61916
9 changed files with 90 additions and 192 deletions

View File

@@ -1,21 +1,27 @@
package controller
import (
"github.com/eatmoreapple/openwechat"
"fmt"
"github.com/robfig/cron"
"time"
"github.com/eatmoreapple/openwechat"
"go-bot/bot/tool"
)
//获取
self, err := getCurrentUser()
var self = tool.GetCurrentUser()
func SignInBegin(msg *openwechat.Message) {
groups, err := tool.GetGroups()
name := groups.GetByNickName("叫啥好呢")
fmt.Printf(name.NickName, err)
// 发送到微信
self.SendTextToGroup("叫啥好呢", "打卡程序启动成功!" + err)
self.SendTextToGroup(name, "打卡程序启动成功!")
}
func SignInEnd(msg *openwechat.Message){
func SignInEnd(msg *openwechat.Message) {
groups, err := tool.GetGroups()
name := groups.GetByNickName("叫啥好呢")
fmt.Printf(name.NickName, err)
// 发送到微信
self.SendTextToGroup("叫啥好呢", "打卡程序结束运行成功!" + err)
}
self.SendTextToGroup(name, "打卡程序结束运行成功!")
}