chore: OneBotApi

This commit is contained in:
手瓜一十雪
2024-08-09 15:44:45 +08:00
parent 7587e1b8f5
commit 086a6ad2cd
111 changed files with 4493 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import { SelfInfo, LineDevice, SelfStatusInfo } from "./entities";
import { LegacyNTEventWrapper } from "@/common/framework/event-legacy";
import { NTQQFriendApi, NTQQGroupApi, NTQQMsgApi, NTQQUserApi, NTQQWebApi } from "./apis";
import os from "node:os";
import { NTQQCollectionApi } from "./apis/collection";
export enum NapCatCoreWorkingEnv {
Unknown = 0,
Shell = 1,
@@ -42,6 +43,7 @@ export class NapCatCore {
this.eventWrapper = new LegacyNTEventWrapper(context.wrapper, context.session);
this.initNapCatCoreListeners().then().catch(console.error);
this.ApiContext = {
CollectionApi:new NTQQCollectionApi(this.context, this),
WebApi: new NTQQWebApi(this.context, this),
FriendApi: new NTQQFriendApi(this.context, this),
MsgApi: new NTQQMsgApi(this.context, this),

View File

@@ -5,6 +5,7 @@ import { SelfInfo } from "../entities";
import { NodeIKernelLoginService } from "../services";
import { WrapperNodeApi, NodeIQQNTWrapperSession } from "@/core";
import { NTQQFriendApi, NTQQGroupApi, NTQQMsgApi, NTQQUserApi, NTQQWebApi } from "../apis";
import { NTQQCollectionApi } from "../apis/collection";
export interface InstanceContext {
readonly workingEnv: NapCatCoreWorkingEnv;
@@ -15,6 +16,7 @@ export interface InstanceContext {
readonly basicInfoWrapper: QQBasicInfoWrapper;
}
export interface NTApiContext {
CollectionApi: NTQQCollectionApi,
WebApi: NTQQWebApi,
FriendApi: NTQQFriendApi,
MsgApi: NTQQMsgApi,