From 48a100f49a44225b98d46978e456b304ccaeeea9 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: Sat, 11 May 2024 10:51:07 +0800 Subject: [PATCH 1/4] feat: reboot-uncomplete --- src/common/utils/reboot.ts | 16 ++++++++++++++++ src/core | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/common/utils/reboot.ts diff --git a/src/common/utils/reboot.ts b/src/common/utils/reboot.ts new file mode 100644 index 00000000..26057ec3 --- /dev/null +++ b/src/common/utils/reboot.ts @@ -0,0 +1,16 @@ +import { exit } from "process"; +import { resolve } from "path"; +async function reboot() { + + let batScript = resolve(__dirname, '../napcat.bat'); + let batUtf8Script = resolve(__dirname, '../napcat-utf8.bat'); + let bashScript = resolve(__dirname, '../napcat.sh'); + //如果是win系统写出 5s延迟启动 默认batUtf8Script启动 + // 如果是linux系统写出 5s延迟启动 默认bashScript启动 + if (process.platform === 'win32') { + // console.log('正在重启...'); + } else if (process.platform === 'linux') { + //console.log('正在重启...'); + } + exit(0); +} \ No newline at end of file diff --git a/src/core b/src/core index 85d0256d..519d686d 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 85d0256dbcc9cf0d1773da3f10cfc180be1ab56b +Subproject commit 519d686d71b1f891e8f30ec4bb1415f24d5c9271 From 3e27d5fcb02bcaad423668d0497919e1bd887cb8 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: Sat, 11 May 2024 13:06:35 +0800 Subject: [PATCH 2/4] fix:roboot file --- src/common/utils/reboot.ts | 7 +++---- src/core | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/utils/reboot.ts b/src/common/utils/reboot.ts index 26057ec3..98f7c1a6 100644 --- a/src/common/utils/reboot.ts +++ b/src/common/utils/reboot.ts @@ -1,10 +1,9 @@ import { exit } from "process"; import { resolve } from "path"; async function reboot() { - - let batScript = resolve(__dirname, '../napcat.bat'); - let batUtf8Script = resolve(__dirname, '../napcat-utf8.bat'); - let bashScript = resolve(__dirname, '../napcat.sh'); + let batScript = resolve(__dirname, './napcat.bat'); + let batUtf8Script = resolve(__dirname, './napcat-utf8.bat'); + let bashScript = resolve(__dirname, './napcat.sh'); //如果是win系统写出 5s延迟启动 默认batUtf8Script启动 // 如果是linux系统写出 5s延迟启动 默认bashScript启动 if (process.platform === 'win32') { diff --git a/src/core b/src/core index 519d686d..fd740c85 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 519d686d71b1f891e8f30ec4bb1415f24d5c9271 +Subproject commit fd740c85acf31e44ed8051a07f95d9b4c0978fde From ad4b84d4468a0aa78bd5b4e0c2430a93dc74f924 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: Sat, 11 May 2024 13:10:34 +0800 Subject: [PATCH 3/4] build: 1.3.2-beta3 --- CHANGELOG.md | 2 +- src/onebot11/action/extends/GetFriendCategory.ts | 4 ++-- src/onebot11/action/index.ts | 4 ++-- src/onebot11/action/types.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9dd64f2d..ca4e6abf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,6 @@ QQ Version: Windows 9.9.9-23424 / Linux 3.2.7-23361 * 重置Rkey获取机制,使用接口分发Rkey ## 新增与调整 -* 新增获取好友列表Api /get_friend_category +* 新增扩展获取好友分类列表 Api /get_friend_with_category 新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api) diff --git a/src/onebot11/action/extends/GetFriendCategory.ts b/src/onebot11/action/extends/GetFriendCategory.ts index 399552a1..35d0d63f 100644 --- a/src/onebot11/action/extends/GetFriendCategory.ts +++ b/src/onebot11/action/extends/GetFriendCategory.ts @@ -5,8 +5,8 @@ import BaseAction from '../BaseAction'; import { ActionName } from '../types'; import { buddyCategorType } from '@/core/entities/'; -export class GetFriendCategory extends BaseAction> { - actionName = ActionName.GetFriendCategory; +export class GetFriendWithCategory extends BaseAction> { + actionName = ActionName.GetFriendWithCategory; protected async _handle(payload: void) { return buddyCategory.data; diff --git a/src/onebot11/action/index.ts b/src/onebot11/action/index.ts index ea5c84b7..0eac336a 100644 --- a/src/onebot11/action/index.ts +++ b/src/onebot11/action/index.ts @@ -52,7 +52,7 @@ import { SetOnlineStatus } from './extends/SetOnlineStatus'; import { GetGroupNotice } from './group/GetGroupNotice'; import { GetGroupEssence } from './group/GetGroupEssence'; import { ForwardFriendSingleMsg, ForwardGroupSingleMsg } from '@/onebot11/action/msg/ForwardSingleMsg'; -import { GetFriendCategory } from './extends/GetFriendCategory'; +import { GetFriendWithCategory } from './extends/GetFriendWithCategory'; export const actionHandlers = [ new GetFile(), @@ -95,7 +95,7 @@ export const actionHandlers = [ // new SetOnlineStatus(), new GetRobotUinRange(), - new GetFriendCategory(), + new GetFriendWithCategory(), //以下为go-cqhttp api new GetGroupNotice(), new GetGroupEssence(), diff --git a/src/onebot11/action/types.ts b/src/onebot11/action/types.ts index dc448a78..f60400ab 100644 --- a/src/onebot11/action/types.ts +++ b/src/onebot11/action/types.ts @@ -57,7 +57,7 @@ export enum ActionName { // 以下为扩展napcat扩展 GetRobotUinRange = 'get_robot_uin_range', SetOnlineStatus = 'set_online_status', - GetFriendCategory = 'get_friend_category', + GetFriendWithCategory = 'get_friend_with_category', // 以下为go-cqhttp api GoCQHTTP_GetEssenceMsg = 'get_essence_msg_list', GoCQHTTP_SetGroupNotice = '_send_group_notice', From c95d0e0696872eb47713235cd19489c145595442 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: Sat, 11 May 2024 13:34:04 +0800 Subject: [PATCH 4/4] build: 1.3.2-beta5 --- .../extends/{GetFriendCategory.ts => GetFriendWithCategory.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/onebot11/action/extends/{GetFriendCategory.ts => GetFriendWithCategory.ts} (100%) diff --git a/src/onebot11/action/extends/GetFriendCategory.ts b/src/onebot11/action/extends/GetFriendWithCategory.ts similarity index 100% rename from src/onebot11/action/extends/GetFriendCategory.ts rename to src/onebot11/action/extends/GetFriendWithCategory.ts