chore: active-websocket

This commit is contained in:
手瓜一十雪
2024-08-11 00:19:28 +08:00
parent 4b51b883e6
commit 0dedd7ab4a
2 changed files with 12 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ import { OB11BaseMetaEvent } from './OB11BaseMetaEvent';
import { NapCatCore } from '@/core';
interface HeartbeatStatus {
online: boolean | null,
online: boolean | undefined,
good: boolean
}
@@ -11,11 +11,11 @@ export class OB11HeartbeatEvent extends OB11BaseMetaEvent {
status: HeartbeatStatus;
interval: number;
public constructor(core: NapCatCore, interval: number, isOnline: boolean | null, isGood: boolean) {
public constructor(core: NapCatCore, interval: number, isOnline: boolean | undefined, isGood: boolean) {
super(core);
this.interval = interval;
this.status = {
online: isOnline,
online: isOnline && true,
good: isGood,
};
}