@@ -21,7 +21,6 @@ package main
21
21
import (
22
22
"fmt"
23
23
"github.com/wechaty/go-wechaty/wechaty"
24
- wp "github.com/wechaty/go-wechaty/wechaty-puppet"
25
24
"github.com/wechaty/go-wechaty/wechaty-puppet/schemas"
26
25
"github.com/wechaty/go-wechaty/wechaty/user"
27
26
"log"
@@ -31,9 +30,7 @@ import (
31
30
)
32
31
33
32
func main () {
34
- var bot = wechaty .NewWechaty (wechaty .WithPuppetOption (& wp.Option {
35
- Token : "" ,
36
- }))
33
+ var bot = wechaty .NewWechaty ()
37
34
38
35
bot .OnScan (func (qrCode string , status schemas.ScanStatus , data string ) {
39
36
fmt .Printf ("Scan QR Code to login: %v\n https://api.qrserver.com/v1/create-qr-code/?data=%s\n " , status , qrCode )
@@ -81,12 +78,12 @@ func onMessage(message *user.Message) {
81
78
}
82
79
log .Println ("REPLY: dong" )
83
80
84
- // // 2. reply image(qrcode image)
85
- // fileBox, _ := file_box.NewFileBoxFromUrl ("https://wechaty.github.io/wechaty/images/bot-qr-code.png", "", nil)
86
- // _, err = message.SayFile (fileBox)
87
- // if err != nil {
88
- // log.Println(err)
89
- // return
90
- // }
91
- // log.Printf("REPLY: %s\n", fileBox)
81
+ // 2. reply image(qrcode image)
82
+ //fileBox, _ := file_box.FromUrl ("https://wechaty.github.io/wechaty/images/bot-qr-code.png", "", nil)
83
+ //_, err = message.Say (fileBox)
84
+ //if err != nil {
85
+ // log.Println(err)
86
+ // return
87
+ //}
88
+ //log.Printf("REPLY: %s\n", fileBox)
92
89
}
0 commit comments