Files
NapCatQQ/src/onebot11/action/group/GetGroupList.ts
linyuchen 356aba762c NapCatQQ
2024-04-15 00:09:08 +08:00

21 lines
599 B
TypeScript

import { OB11Group } from '../../types';
import { OB11Constructor } from '../../constructor';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { groups } from '@/common/data';
class GetGroupList extends BaseAction<null, OB11Group[]> {
actionName = ActionName.GetGroupList;
protected async _handle(payload: null) {
// if (groups.length === 0) {
// const groups = await NTQQGroupApi.getGroups(true)
// log("get groups", groups)
// }
return OB11Constructor.groups(Array.from(groups.values()));
}
}
export default GetGroupList;