mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: raw api add
This commit is contained in:
parent
687aa0f363
commit
714d7d72eb
@ -241,6 +241,9 @@ export class NTQQUserApi {
|
||||
// }
|
||||
return uin;
|
||||
}
|
||||
static async getRecentContactList() {
|
||||
return await napCatCore.session.getRecentContactService().getRecentContactList();
|
||||
}
|
||||
static async getUserDetailInfoByUin(Uin: string) {
|
||||
return NTEventDispatch.CallNoListenerEvent
|
||||
<(Uin: string) => Promise<UserDetailInfoByUin>>(
|
||||
|
@ -253,7 +253,7 @@ export interface NodeIKernelMsgService {
|
||||
pageLimit: number,
|
||||
isReverseOrder: boolean,
|
||||
isIncludeCurrent: boolean
|
||||
}):Promise<unknown>;
|
||||
}): Promise<unknown>;
|
||||
|
||||
queryPicOrVideoMsgsDesktop(...args: unknown[]): unknown;
|
||||
|
||||
@ -356,7 +356,7 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
getFileThumbSavePath(...args: unknown[]): unknown;
|
||||
|
||||
translatePtt2Text(...args: unknown[]): unknown;
|
||||
translatePtt2Text(j2: string, e2: {}, e3: {}): unknown;
|
||||
|
||||
setPttPlayedState(...args: unknown[]): unknown;
|
||||
|
||||
|
@ -43,7 +43,7 @@ export interface NodeIKernelRecentContactService {
|
||||
|
||||
deleteRecentContactsVer2(...args: unknown[]): unknown; // 1 arguments
|
||||
|
||||
getRecentContactList(): unknown;
|
||||
getRecentContactList(): Promise<any>;
|
||||
|
||||
getMsgUnreadCount(): unknown;
|
||||
|
||||
|
@ -39,6 +39,7 @@ import { NodeIKernelTianShuService } from './services/NodeIKernelTianShuService'
|
||||
import { NodeIKernelUnitedConfigService } from './services/NodeIKernelUnitedConfigService';
|
||||
import { NodeIKernelSearchService } from './services/NodeIKernelSearchService';
|
||||
import { NodeIKernelCollectionService } from './services/NodeIKernelCollectionService';
|
||||
import { NodeIKernelRecentContactService } from './services/NodeIKernelRecentContactService';
|
||||
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
@ -236,7 +237,7 @@ export interface NodeIQQNTWrapperSession {
|
||||
|
||||
getAVSDKService(): unknown;
|
||||
|
||||
getRecentContactService(): unknown;
|
||||
getRecentContactService(): NodeIKernelRecentContactService;
|
||||
|
||||
getConfigMgrService(): unknown;
|
||||
}
|
||||
|
@ -72,6 +72,7 @@ import { CreateCollection } from './extends/CreateCollection';
|
||||
import { SetLongNick } from './extends/SetLongNick';
|
||||
import DelEssenceMsg from './group/DelEssenceMsg';
|
||||
import SetEssenceMsg from './group/SetEssenceMsg';
|
||||
import GetRecentContact from './user/GetRecentContact';
|
||||
|
||||
export const actionHandlers = [
|
||||
new RebootNormal(),
|
||||
@ -151,7 +152,8 @@ export const actionHandlers = [
|
||||
new GoCQHTTPHandleQuickAction(),
|
||||
new GetGroupSystemMsg(),
|
||||
new DelEssenceMsg(),
|
||||
new SetEssenceMsg()
|
||||
new SetEssenceMsg(),
|
||||
new GetRecentContact()
|
||||
];
|
||||
|
||||
function initActionMap() {
|
||||
|
@ -95,5 +95,6 @@ export enum ActionName {
|
||||
GetCollectionList = 'get_collection_list',
|
||||
SetLongNick = 'set_self_longnick',
|
||||
SetEssenceMsg = "set_essence_msg",
|
||||
DelEssenceMsg = "delete_essence_msg"
|
||||
DelEssenceMsg = "delete_essence_msg",
|
||||
GetRecentContact = "get_recent_contact"
|
||||
}
|
||||
|
11
src/onebot11/action/user/GetRecentContact.ts
Normal file
11
src/onebot11/action/user/GetRecentContact.ts
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQUserApi } from '@/core';
|
||||
|
||||
export default class GetRecentContact extends BaseAction<void, any> {
|
||||
actionName = ActionName.GetRecentContact;
|
||||
protected async _handle(payload: void) {
|
||||
return await NTQQUserApi.getRecentContactList()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user