diff --git a/src/onebot11/action/extends/GetRobotUinRange.ts b/src/onebot11/action/extends/GetRobotUinRange.ts new file mode 100644 index 00000000..b73814a5 --- /dev/null +++ b/src/onebot11/action/extends/GetRobotUinRange.ts @@ -0,0 +1,14 @@ +import { OB11User } from '../../types'; +import { OB11Constructor } from '../../constructor'; +import { friends } from '../../../common/data'; +import BaseAction from '../BaseAction'; +import { ActionName } from '../types'; +import { NTQQUserApi } from '@/core/apis'; +export class GetRobotUinRange extends BaseAction> { + actionName = ActionName.GetRobotUinRange; + + protected async _handle(payload: void) { + // console.log(await NTQQUserApi.getRobotUinRange()); + return await NTQQUserApi.getRobotUinRange(); + } +} diff --git a/src/onebot11/action/index.ts b/src/onebot11/action/index.ts index c08c812d..285d37f3 100644 --- a/src/onebot11/action/index.ts +++ b/src/onebot11/action/index.ts @@ -47,6 +47,7 @@ import { GoCQHTTGetForwardMsgAction } from './go-cqhttp/GetForwardMsg'; import GetFriendMsgHistory from './go-cqhttp/GetFriendMsgHistory'; import { GetCookies } from './user/GetCookies'; import { SetMsgEmojiLike } from '@/onebot11/action/msg/SetMsgEmojiLike'; +import { GetRobotUinRange } from './extends/GetRobotUinRange'; export const actionHandlers = [ new GetFile(), @@ -84,6 +85,8 @@ export const actionHandlers = [ new SetMsgEmojiLike(), // new CleanCache(), new GetCookies(), + // + new GetRobotUinRange(), //以下为go-cqhttp api new GoCQHTTPSendForwardMsg(), new GoCQHTTPSendGroupForwardMsg(), diff --git a/src/onebot11/action/types.ts b/src/onebot11/action/types.ts index 9eb34215..f70594bc 100644 --- a/src/onebot11/action/types.ts +++ b/src/onebot11/action/types.ts @@ -51,8 +51,9 @@ export enum ActionName { GetImage = 'get_image', GetRecord = 'get_record', CleanCache = 'clean_cache', - GetCookies = "get_cookies", - + GetCookies = 'get_cookies', + // 以下为扩展napcat扩展 + GetRobotUinRange = 'get_robot_uin_range', // 以下为go-cqhttp api GoCQHTTP_SendForwardMsg = 'send_forward_msg', GoCQHTTP_SendGroupForwardMsg = 'send_group_forward_msg',