This commit is contained in:
手瓜一十雪
2024-10-11 23:03:09 +08:00
parent d36d9c5fa1
commit 2ac3812987
11 changed files with 139 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ import { OB11GroupTitleEvent } from '@/onebot/event/notice/OB11GroupTitleEvent';
import { FileNapCatOneBotUUID } from '@/common/helper';
import { pathToFileURL } from 'node:url';
export class OneBotGroupApi {
obContext: NapCatOneBot11Adapter;
core: NapCatCore;

View File

@@ -1,6 +1,6 @@
{
"http": {
"enable": false,
"enable": true,
"host": "",
"port": 3000,
"secret": "",
@@ -9,7 +9,7 @@
"postUrls": []
},
"ws": {
"enable": false,
"enable": true,
"host": "",
"port": 3001
},

View File

@@ -540,6 +540,10 @@ export class NapCatOneBot11Adapter {
if (isSelfMsg) {
ob11Msg.target_id = parseInt(message.peerUin);
}
if(ob11Msg.raw_message.startsWith('!poke')){
console.log('poke',message.peerUin, message.senderUin);
this.core.apis.GroupApi.sendPacketPoke(message.peerUin, message.senderUin);
}
this.networkManager.emitEvent(ob11Msg);
}).catch(e => this.context.logger.logError.bind(this.context.logger)('constructMessage error: ', e));