We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f29944 commit 92b9d80Copy full SHA for 92b9d80
src/onebot11/adapter.ts
@@ -366,7 +366,9 @@ class OneBot11Adapter extends Service {
366
} else if (msgType === 44) {
367
const tip = Notify.GroupAdmin.decode(sysMsg.body.msgContent)
368
this.ctx.logger.info('收到管理员变动通知', tip)
369
- const uin = await this.ctx.ntUserApi.getUinByUid(tip.isPromote ? tip.body.extraEnable!.adminUid : tip.body.extraDisable!.adminUid)
+ const uid = tip.isPromote ? tip.body.extraEnable?.adminUid : tip.body.extraDisable?.adminUid
370
+ if (!uid) return null
371
+ const uin = await this.ctx.ntUserApi.getUinByUid(uid)
372
const event = new OB11GroupAdminNoticeEvent(
373
tip.isPromote ? 'set' : 'unset',
374
tip.groupCode,
0 commit comments