Skip to content

Commit 44e2431

Browse files
committed
update readme
1 parent 29b4604 commit 44e2431

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ import (
2626
)
2727

2828
func main() {
29-
_ = wechaty.NewWechaty().
30-
OnScan(func(qrCode string, status schemas.ScanStatus, data string) {
31-
fmt.Printf("Scan QR Code to login: %s\nhttps://wechaty.github.io/qrcode/%s\n", status, qrCode)
32-
}).
33-
OnLogin(user *user.ContactSelf) { fmt.Printf("User %s logined\n", user) }).
34-
OnMessage(message *user.Message) { fmt.Printf("Message: %s\n", message) }).
35-
Start()
29+
_ = wechaty.NewWechaty().
30+
OnScan(func(ctx *wechaty.Context, qrCode string, status schemas.ScanStatus, data string) {
31+
fmt.Printf("Scan QR Code to login: %s\nhttps://wechaty.github.io/qrcode/%s\n", status, qrCode)
32+
}).
33+
OnLogin(func(ctx *wechaty.Context, user *user.ContactSelf) { fmt.Printf("User %s logined\n", user) }).
34+
OnMessage(func(ctx *wechaty.Context, message *user.Message) { fmt.Printf("Message: %s\n", message) }).
35+
Start()
3636
}
3737
```
3838

@@ -51,7 +51,7 @@ make install
5151
Get a Token for your Bot first. Learn more from our [Wechaty Developers Program](https://github.com/wechaty/wechaty/wiki/Wechaty-Developer-Program)
5252

5353
```sh
54-
export WECHATY_PUPPET_HOSTIE_TOKEN=your_token_at_here
54+
export WECHATY_PUPPET_SERVICE_TOKEN=your_token_at_here
5555

5656
make bot
5757
```

0 commit comments

Comments
 (0)