From 20a932fd479fc0cbdbc840f521fd7432010f8777 Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 22 May 2025 13:48:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7&=E7=BE=A4=E8=81=8A=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/bot/bot.controller.ts | 4 ++-- src/types/qq/groupInfo.ts | 5 +++++ src/types/qq/userInfo.ts | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/types/qq/groupInfo.ts create mode 100644 src/types/qq/userInfo.ts diff --git a/src/modules/bot/bot.controller.ts b/src/modules/bot/bot.controller.ts index c9f83a9..bc5f901 100644 --- a/src/modules/bot/bot.controller.ts +++ b/src/modules/bot/bot.controller.ts @@ -141,8 +141,8 @@ class BotController { return await response.error(res, '缺少 message 字段', 400); } if (tools.checkToken(token.toString())) { - logger.info(`广播任务已开始,正在后台异步执行`); - await response.success(res, {}); + logger.info(`广播任务已开始,正在后台执行..`); + await response.success(res, '广播任务已开始,正在后台执行..'); await BotService.broadcastToAllGroups(message); } else { await tools.tokenCheckFailed(res, token); diff --git a/src/types/qq/groupInfo.ts b/src/types/qq/groupInfo.ts new file mode 100644 index 0000000..dd2b661 --- /dev/null +++ b/src/types/qq/groupInfo.ts @@ -0,0 +1,5 @@ +export default interface GroupInfo { + name: string; + groupId: number; + memberCount: number; //群人数 +} diff --git a/src/types/qq/userInfo.ts b/src/types/qq/userInfo.ts new file mode 100644 index 0000000..044f41a --- /dev/null +++ b/src/types/qq/userInfo.ts @@ -0,0 +1,16 @@ +export default interface UserInfo { + qq: number; + email?: string; + labAccount?: string; + username: string; + nickname?: string; + + /** + * 管理的群 + * 第一个number为群号,第二个number为在群内的botId + */ + manageGroups: Record; + role: 'super' | 'admin' | 'user'; + balance: number; + bots: number[]; +}