test
Signed-off-by: NothAmor <nothamor@localhost.localdomain>
This commit is contained in:
parent
bbaa50ab1e
commit
08879db12e
12
main.go
12
main.go
@ -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) {
|
||||||
|
@ -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表达式,每五秒一次
|
||||||
|
Loading…
x
Reference in New Issue
Block a user