Revert "chore: network context"

This reverts commit 3a4addb0b2.
This commit is contained in:
手瓜一十雪
2024-08-10 16:35:58 +08:00
parent 3a4addb0b2
commit 0c747ab811
4 changed files with 12 additions and 35 deletions

View File

@@ -4,8 +4,6 @@ import { WebSocket as NodeWebSocket } from 'ws';
import BaseAction from '@/onebot/action/BaseAction';
import { OB11BaseEvent } from '@/onebot/event/OB11BaseEvent';
import { sleep } from '@/common/utils/helper';
import { NapCatOneBot11Adapter } from '../main';
import { NapCatCore } from '@/core';
export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
url: string;
@@ -14,12 +12,8 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
private connection: NodeWebSocket | null = null;
private actionMap: Map<string, BaseAction<any, any>> = new Map();
obContext: NapCatOneBot11Adapter;
coreContext: NapCatCore;
constructor(obContext: NapCatOneBot11Adapter, coreContext: NapCatCore, url: string, reconnectIntervalInMillis: number) {
this.obContext = obContext;
this.coreContext = coreContext
constructor(url: string, reconnectIntervalInMillis: number) {
this.url = url;
this.reconnectIntervalInMillis = reconnectIntervalInMillis;
}