From cf3f488663b94d6e1cf9338a4268381f356fb1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 12 Aug 2024 18:22:06 +0800 Subject: [PATCH] release: new group --- src/onebot/index.ts | 1 + src/webui/ui/NapCat.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/onebot/index.ts b/src/onebot/index.ts index d7549693..58b9f81c 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -481,6 +481,7 @@ export class NapCatOneBot11Adapter { let operatorId = message.senderUin; for (const element of message.elements) { const operatorUid = element.grayTipElement?.revokeElement.operatorUid; + if(!operatorUid) return; const operator = await this.core.apis.GroupApi.getGroupMember(message.peerUin, operatorUid); operatorId = operator?.uin || message.senderUin; } diff --git a/src/webui/ui/NapCat.ts b/src/webui/ui/NapCat.ts index 6554a8d6..485fa71b 100644 --- a/src/webui/ui/NapCat.ts +++ b/src/webui/ui/NapCat.ts @@ -176,6 +176,16 @@ async function onSettingWindowCreated(view: Element) { ), SettingItem('NapCat 文档', '', SettingButton('看看文档', 'open-docs')) ]), + SettingItem( + 'Telegram 群', + 'https://t.me/+nLZEnpne-pQ1OWFl', + SettingButton('进去逛逛', 'open-telegram') + ), + SettingItem( + 'QQ 群', + '518662028', + SettingButton('我要进去', 'open-qq-group') + ), '', ].join(''), 'text/html', @@ -188,6 +198,12 @@ async function onSettingWindowCreated(view: Element) { doc.querySelector('#open-docs')?.addEventListener('click', () => { window.open('https://napneko.github.io/', '_blank'); }); + doc.querySelector('#open-telegram')?.addEventListener('click', () => { + window.open('https://t.me/+nLZEnpne-pQ1OWFl', '_blank'); + }); + doc.querySelector('#open-qq-group')?.addEventListener('click', () => { + window.open('https://qm.qq.com/q/VfjAq5HIMS', '_blank'); + }); // 生成反向地址列表 const buildHostListItem = ( type: string,