mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-01-01 07:19:03 +08:00
feat: 扩展GetFriendCategory Api
This commit is contained in:
parent
cae84bbf02
commit
261c6dabd5
2
src/core
2
src/core
@ -1 +1 @@
|
||||
Subproject commit f285120670e02b0ee7d432c573a6b9b57b701367
|
||||
Subproject commit 934d336bbdd2ac59a2b5d025bf4c0d7b2879bf54
|
||||
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',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user