From e554d805b5ebc3477cd5466b51f4b44eeb0ad91b Mon Sep 17 00:00:00 2001 From: YuChuXi <81864000+YuChuXi@users.noreply.github.com> Date: Sat, 17 Feb 2024 01:39:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E4=B8=9C=E8=A5=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: get_group_info和get_group_list都返回群列表 --- src/onebot11/actions/GetGroupInfo.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/onebot11/actions/GetGroupInfo.ts b/src/onebot11/actions/GetGroupInfo.ts index af59af1..0ff09a1 100644 --- a/src/onebot11/actions/GetGroupInfo.ts +++ b/src/onebot11/actions/GetGroupInfo.ts @@ -1,5 +1,5 @@ import { OB11Group } from '../types'; -import { getGroup, groups } from "../../common/data"; +import { getGroup } from "../../common/data"; import { OB11Constructor } from "../constructor"; import BaseAction from "./BaseAction"; import { ActionName } from "./types"; @@ -8,17 +8,17 @@ interface PayloadType { group_id: number } -class GetGroupInfo extends BaseAction { +class GetGroupInfo extends BaseAction { actionName = ActionName.GetGroupInfo protected async _handle(payload: PayloadType) { const group = await getGroup(payload.group_id.toString()) if (group) { - return OB11Constructor.groups(groups) + return OB11Constructor.group(group) } else { throw `群${payload.group_id}不存在` } } } -export default GetGroupInfo \ No newline at end of file +export default GetGroupInfo