mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 23:40:24 +00:00
21 lines
599 B
TypeScript
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;
|