Signed-off-by: NothAmor <nothamor@localhost.localdomain>
This commit is contained in:
NothAmor 2022-07-18 23:53:32 +08:00
parent bbaa50ab1e
commit 08879db12e
2 changed files with 7 additions and 7 deletions

12
main.go
View File

@ -13,12 +13,12 @@ import (
func main() { func main() {
//创建热存储容器对象 // //创建热存储容器对象
reloadStorage := openwechat.NewJsonFileHotReloadStorage("storage.json") // reloadStorage := openwechat.NewJsonFileHotReloadStorage("storage.json")
//执行热登录 // //执行热登录
bot.HotLogin(reloadStorage) // bot.HotLogin(reloadStorage)
os.File("storage.json") // os.File("storage.json")
//bot := openwechat.DefaultBot(openwechat.Desktop) bot := openwechat.DefaultBot(openwechat.Desktop)
// 注册消息处理函数 // 注册消息处理函数
bot.MessageHandler = func(msg *openwechat.Message) { bot.MessageHandler = func(msg *openwechat.Message) {

View File

@ -21,7 +21,7 @@ func SignInBegin(msg *openwechat.Message) {
fmt.Println(groups, err) fmt.Println(groups, err)
// 发送到微信 // 发送到微信
self.SendTextToGroup("叫啥好呢", "同志们开卷" + err) self.SendTextToGroup("叫啥好呢", "同志们开卷!")
} }
//定时任务 //定时任务
spec := "*/10 * * * * ?" //cron表达式每五秒一次 spec := "*/10 * * * * ?" //cron表达式每五秒一次