mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
chore: reformat code style
This commit is contained in:
@@ -13,7 +13,7 @@ export class OB11ActiveHttpAdapter implements IOB11NetworkAdapter {
|
||||
public url: string,
|
||||
public secret: string | undefined,
|
||||
public core: NapCatCore,
|
||||
public obContext: NapCatOneBot11Adapter
|
||||
public obContext: NapCatOneBot11Adapter,
|
||||
) {
|
||||
this.logger = core.context.logger;
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
connectEvent(core: NapCatCore) {
|
||||
try {
|
||||
this.checkStateAndReply<any>(new OB11LifeCycleEvent(core, LifeCycleSubType.CONNECT));
|
||||
@@ -126,6 +127,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
|
||||
this.logger.logError('[OneBot] [WebSocket Client] 发送生命周期失败', e);
|
||||
}
|
||||
}
|
||||
|
||||
private async handleMessage(message: any) {
|
||||
let receiveData: { action: ActionName, params?: any, echo?: any } = { action: ActionName.Unknown, params: {} };
|
||||
let echo = undefined;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IOB11NetworkAdapter, OB11EmitEventContent } from './index';
|
||||
import { IOB11NetworkAdapter } from './index';
|
||||
import express, { Express, Request, Response } from 'express';
|
||||
import http from 'http';
|
||||
import { NapCatCore } from '@/core';
|
||||
@@ -44,6 +44,7 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter {
|
||||
this.server?.close();
|
||||
this.app = undefined;
|
||||
}
|
||||
|
||||
private initializeServer() {
|
||||
this.app = express();
|
||||
this.server = http.createServer(this.app);
|
||||
|
||||
@@ -28,7 +28,7 @@ export class OB11PassiveWebSocketAdapter implements IOB11NetworkAdapter {
|
||||
heartbeatInterval: number,
|
||||
token: string,
|
||||
core: NapCatCore,
|
||||
public actions: ActionMap
|
||||
public actions: ActionMap,
|
||||
) {
|
||||
this.core = core;
|
||||
this.logger = core.context.logger;
|
||||
|
||||
Reference in New Issue
Block a user