
'Friendship' only refers to a type, but is being used as a value here.ts(2693) import { WechatyBuilder, Friendship } from 'wechaty' const bot = WechatyBuilder.build({ name: "PadLocalDemo", puppet, }) .on('friendship', async friendship => { switch (friendship.type()) { case Friendship.Type.Receive: await friendship.accept() case Friendship.Type.Confirm: console.log(friendship.contact()) } }) bot.start() bot.ready() 1 juventusryp OP 已在群里获得解决 |