mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
feat: 扩展GetFriendCategory Api
This commit is contained in:
2
src/core
2
src/core
Submodule src/core updated: f285120670...934d336bbd
14
src/onebot11/action/extends/GetFriendCategory.ts
Normal file
14
src/onebot11/action/extends/GetFriendCategory.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { OB11User } from '../../types';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { buddyCategory, friends } from '@/core/data';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { buddyCategorType } from '@/core/entities/';
|
||||
|
||||
export class GetFriendCategory extends BaseAction<void, Array<buddyCategorType>> {
|
||||
actionName = ActionName.GetFriendCategory;
|
||||
|
||||
protected async _handle(payload: void) {
|
||||
return buddyCategory.data;
|
||||
}
|
||||
}
|
@@ -52,6 +52,7 @@ import { SetOnlineStatus } from './extends/SetOnlineStatus';
|
||||
import { GetGroupNotice } from './group/GetGroupNotice';
|
||||
import { GetGroupEssence } from './group/GetGroupEssence';
|
||||
import { ForwardFriendSingleMsg, ForwardGroupSingleMsg } from '@/onebot11/action/msg/ForwardSingleMsg';
|
||||
import { GetFriendCategory } from './extends/GetFriendCategory';
|
||||
|
||||
export const actionHandlers = [
|
||||
new GetFile(),
|
||||
@@ -94,6 +95,7 @@ export const actionHandlers = [
|
||||
//
|
||||
new SetOnlineStatus(),
|
||||
new GetRobotUinRange(),
|
||||
new GetFriendCategory(),
|
||||
//以下为go-cqhttp api
|
||||
new GetGroupNotice(),
|
||||
new GetGroupEssence(),
|
||||
|
@@ -57,8 +57,9 @@ export enum ActionName {
|
||||
// 以下为扩展napcat扩展
|
||||
GetRobotUinRange = 'get_robot_uin_range',
|
||||
SetOnlineStatus = 'set_online_status',
|
||||
GetFriendCategory = 'get_friend_category',
|
||||
// 以下为go-cqhttp api
|
||||
GoCQHTTP_GetEssenceMsg='get_essence_msg_list',
|
||||
GoCQHTTP_GetEssenceMsg = 'get_essence_msg_list',
|
||||
GoCQHTTP_SetGroupNotice = '_send_group_notice',
|
||||
GoCQHTTP_GetGroupNotice = '_get_group_notice',
|
||||
GoCQHTTP_SendForwardMsg = 'send_forward_msg',
|
||||
|
Reference in New Issue
Block a user