mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-13 00:10:27 +00:00
NapCatQQ
This commit is contained in:
20
src/onebot11/action/group/GetGroupList.ts
Normal file
20
src/onebot11/action/group/GetGroupList.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user