Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
34 lines
821 B
TypeScript
34 lines
821 B
TypeScript
import { PacketContext } from "@/core/packet/context/packetContext";
|
|
import { NapCatCore } from "@/core";
|
|
|
|
export class PacketClientSession {
|
|
private readonly context: PacketContext;
|
|
|
|
constructor(core: NapCatCore) {
|
|
this.context = new PacketContext(core);
|
|
}
|
|
|
|
init(pid: number, recv: string, send: string): Promise<void> {
|
|
return this.context.client.init(pid, recv, send);
|
|
}
|
|
|
|
get clientLogStack() {
|
|
return this.context.client.clientLogStack;
|
|
}
|
|
|
|
get available() {
|
|
return this.context.client.available;
|
|
}
|
|
|
|
get operation() {
|
|
return this.context.operation;
|
|
}
|
|
get client() {
|
|
return this.context.client;
|
|
}
|
|
// TODO: global message element adapter (?
|
|
get msgConverter() {
|
|
return this.context.msgConverter;
|
|
}
|
|
}
|