Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Apr 27, 2024
1 parent ebab8a1 commit b31876d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/onebot11/action/extends/GetRobotUinRange.ts
Original file line number Diff line number Diff line change
@@ -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<void, Array<any>> {
actionName = ActionName.GetRobotUinRange;

protected async _handle(payload: void) {
// console.log(await NTQQUserApi.getRobotUinRange());
return await NTQQUserApi.getRobotUinRange();
}
}
3 changes: 3 additions & 0 deletions src/onebot11/action/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -84,6 +85,8 @@ export const actionHandlers = [
new SetMsgEmojiLike(),
// new CleanCache(),
new GetCookies(),
//
new GetRobotUinRange(),
//以下为go-cqhttp api
new GoCQHTTPSendForwardMsg(),
new GoCQHTTPSendGroupForwardMsg(),
Expand Down
5 changes: 3 additions & 2 deletions src/onebot11/action/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b31876d

Please sign in to comment.