mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
refactor: adapter
This commit is contained in:
parent
264cb6bbd2
commit
a804f90b9c
@ -1,9 +1,8 @@
|
||||
import { MsfChangeReasonType, MsfStatusType } from "../entities/adapter";
|
||||
|
||||
export class NodeIDependsAdapter {
|
||||
onMSFStatusChange(arg1: number, arg2: number) {
|
||||
// console.log(arg1, arg2);
|
||||
// if (arg1 == 2 && arg2 == 2) {
|
||||
// log("NapCat丢失网络连接,请检查网络")
|
||||
// }
|
||||
onMSFStatusChange(statusType: MsfStatusType, changeReasonType: MsfChangeReasonType) {
|
||||
|
||||
}
|
||||
|
||||
onMSFSsoError(args: unknown) {
|
||||
|
11
src/core/entities/adapter.ts
Normal file
11
src/core/entities/adapter.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export enum MsfStatusType {
|
||||
KUNKNOWN,
|
||||
KDISCONNECTED,
|
||||
KCONNECTED
|
||||
}
|
||||
export enum MsfChangeReasonType {
|
||||
KUNKNOWN,
|
||||
KUSERLOGININ,
|
||||
KUSERLOGINOUT,
|
||||
KAUTO
|
||||
}
|
@ -229,7 +229,7 @@ export async function NCoreInitShell() {
|
||||
sessionConfig,
|
||||
new NodeIDependsAdapter(),
|
||||
new NodeIDispatcherAdapter(),
|
||||
sessionListener as any,
|
||||
sessionListener,
|
||||
);
|
||||
try {
|
||||
session.startNT(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user