From 1dd468e2fff9c9635d0b5c03650f4d7c02702321 Mon Sep 17 00:00:00 2001 From: linyuchen Date: Sat, 13 Jul 2024 16:25:00 +0800 Subject: [PATCH] fix: #290 --- manifest.json | 4 ++-- src/main/main.ts | 27 ++++++++++++++------------- src/version.ts | 2 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/manifest.json b/manifest.json index 799bf15..22a694f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { "manifest_version": 4, "type": "extension", - "name": "LLOneBot v3.27.0", + "name": "LLOneBot v3.27.1", "slug": "LLOneBot", "description": "使你的NTQQ支持OneBot11协议进行QQ机器人开发", - "version": "3.27.0", + "version": "3.27.1", "icon": "./icon.jpg", "authors": [ { diff --git a/src/main/main.ts b/src/main/main.ts index c5245bb..f7b6019 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -205,20 +205,21 @@ function onLoad() { if (getConfigUtil().getConfig().enablePoke) { if ( qqPkgInfo.buildVersion > '23873'){ log(`当前版本${qqPkgInfo.buildVersion}不支持发送戳一戳模块`) - return } - crychic.loadNode() - crychic.registerPokeHandler((id, isGroup) => { - log(`收到戳一戳消息了!是否群聊:${isGroup},id:${id}`) - let pokeEvent: OB11FriendPokeEvent | OB11GroupPokeEvent - if (isGroup) { - pokeEvent = new OB11GroupPokeEvent(parseInt(id)) - } - else { - pokeEvent = new OB11FriendPokeEvent(parseInt(id)) - } - postOb11Event(pokeEvent) - }) + else { + crychic.loadNode() + crychic.registerPokeHandler((id, isGroup) => { + log(`收到戳一戳消息了!是否群聊:${isGroup},id:${id}`) + let pokeEvent: OB11FriendPokeEvent | OB11GroupPokeEvent + if (isGroup) { + pokeEvent = new OB11GroupPokeEvent(parseInt(id)) + } + else { + pokeEvent = new OB11FriendPokeEvent(parseInt(id)) + } + postOb11Event(pokeEvent) + }) + } } registerReceiveHook<{ msgList: Array diff --git a/src/version.ts b/src/version.ts index 080c347..72ae07f 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '3.27.0' +export const version = '3.27.1'