Skip to content

Commit 45ed411

Browse files
committed
Update raw-sidecar-hook.ts
1 parent 64e0275 commit 45ed411

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

examples/raw-sidecar-hook.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ import {
2929
} from '../src/wechat-sidecar.js'
3030

3131
async function main () {
32-
console.info('WeChat Sidecar starting...')
32+
console.log('WeChat Sidecar starting...')
3333
// new XpSidecar({ wechatVersion: '3.9.2.23' })
3434

3535
const sidecar = new WeChatSidecar()
3636
await attach(sidecar)
3737

38-
console.info('WeChat Sidecar started.')
38+
console.log('WeChat Sidecar started.')
3939

4040
sidecar.on('hook', ({ method, args }) => {
4141
// console.log(`onhook事件消息:${new Date().toLocaleString()}\n`, method, JSON.stringify(args))
@@ -54,13 +54,13 @@ async function main () {
5454
console.log('agentReady...')
5555
break
5656
default:
57-
console.info('onHook没有匹配到处理方法:', method, JSON.stringify(args))
57+
console.log('onHook没有匹配到处理方法:', method, JSON.stringify(args))
5858
break
5959
}
6060
})
6161

6262
const onRecvMsg = async (args: any) => {
63-
console.info('onRecvMsg事件触发:', JSON.stringify(args))
63+
console.log('onRecvMsg事件触发:', JSON.stringify(args))
6464

6565
if (args instanceof Error) {
6666
console.error('onRecvMsg: 参数错误 Error', args)
@@ -73,11 +73,11 @@ async function main () {
7373

7474
// const nickname = await sidecar.GetContactOrChatRoomNickname(talkerId)
7575
// console.log('发言人昵称:', nickname)
76-
console.info('talkerId:', talkerId)
77-
console.info('toId:', toId)
78-
console.info('text:', text)
76+
console.log('talkerId:', talkerId)
77+
console.log('toId:', toId)
78+
console.log('text:', text)
7979
if (talkerId && text === 'ding') {
80-
console.info('叮咚测试: ding found, reply dong')
80+
console.log('叮咚测试: ding found, reply dong')
8181
try {
8282
await sidecar.sendMsg(talkerId || toId, 'dong')
8383
// await sidecar.sendAtMsg(toId, 'dong',talkerId)
@@ -88,7 +88,7 @@ async function main () {
8888
}
8989

9090
const clean = () => {
91-
console.info('Sidecar detaching...')
91+
console.log('Sidecar detaching...')
9292
void detach(sidecar)
9393
}
9494

0 commit comments

Comments
 (0)