Files
NapCatQQ/src/onebot/action/extends/GetFriendWithCategory.ts
T
时瑾 2185a884b4 refactor: 优化eslint配置,提升代码质量 (#1341)
* feat: 统一并标准化eslint

* lint: napcat.webui

* lint: napcat.webui

* lint: napcat.core

* build: fix

* lint: napcat.webui

* refactor: 重构eslint

* Update README.md
2025-11-03 16:30:45 +08:00

15 lines
503 B
TypeScript

import { OB11Construct } from '@/onebot/helper/data';
import { OneBotAction } from '@/onebot/action/OneBotAction';
import { ActionName } from '@/onebot/action/router';
export class GetFriendWithCategory extends OneBotAction<void, unknown> {
override actionName = ActionName.GetFriendsWithCategory;
async _handle () {
return (await this.core.apis.FriendApi.getBuddyV2ExWithCate()).map(category => ({
...category,
buddyList: OB11Construct.friends(category.buddyList),
}));
}
}