diff --git a/src/onebot/api/index.ts b/src/onebot/api/index.ts index a7021d18c..443159f78 100644 --- a/src/onebot/api/index.ts +++ b/src/onebot/api/index.ts @@ -1,8 +1,8 @@ -import { OneBotFriendApi } from '@/onebot/api/friend'; -import { OneBotUserApi } from '@/onebot/api/user'; -import { OneBotGroupApi } from '@/onebot/api/group'; -import { OneBotMsgApi } from '@/onebot/api/msg'; -import { OneBotQuickActionApi } from '@/onebot/api/quick-action'; +import type { OneBotFriendApi } from '@/onebot/api/friend'; +import type { OneBotUserApi } from '@/onebot/api/user'; +import type { OneBotGroupApi } from '@/onebot/api/group'; +import type { OneBotMsgApi } from '@/onebot/api/msg'; +import type { OneBotQuickActionApi } from '@/onebot/api/quick-action'; export * from './friend'; export * from './group'; diff --git a/src/onebot/api/quick-action.ts b/src/onebot/api/quick-action.ts index b6b7d2f4a..8c12ede65 100644 --- a/src/onebot/api/quick-action.ts +++ b/src/onebot/api/quick-action.ts @@ -1,4 +1,4 @@ -import { +import type { NapCatOneBot11Adapter, OB11Message, OB11MessageAt, @@ -10,17 +10,19 @@ import { QuickActionGroupMessage, QuickActionGroupRequest, } from '@/onebot'; -import { NTGroupRequestOperateTypes, NapCatCore, Peer } from '@/core'; -import { OB11FriendRequestEvent } from '@/onebot/event/request/OB11FriendRequest'; -import { OB11GroupRequestEvent } from '@/onebot/event/request/OB11GroupRequest'; +import { NTGroupRequestOperateTypes, type NapCatCore, type Peer } from '@/core'; +import type { OB11FriendRequestEvent } from '@/onebot/event/request/OB11FriendRequest'; +import type { OB11GroupRequestEvent } from '@/onebot/event/request/OB11GroupRequest'; + import { ContextMode, createContext, normalize } from '@/onebot/action/msg/SendMsg'; import { isNull } from '@/common/helper'; export class OneBotQuickActionApi { - constructor( - public obContext: NapCatOneBot11Adapter, - public core: NapCatCore, - ) { + private obContext: NapCatOneBot11Adapter; + private core: NapCatCore; + constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) { + this.obContext = obContext; + this.core = core; } async handleQuickOperation(eventContext: QuickActionEvent, quickAction: QuickAction) { diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 5a87c5b46..b993dfccb 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -76,7 +76,7 @@ export class NapCatOneBot11Adapter { FriendApi: new OneBotFriendApi(this, core), MsgApi: new OneBotMsgApi(this, core), QuickActionApi: new OneBotQuickActionApi(this, core), - }; + } as const; this.actions = createActionMap(this, core); this.networkManager = new OB11NetworkManager(); }