mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-11 23:40:24 +00:00
feat: errorStack
This commit is contained in:
@@ -10,7 +10,8 @@ export abstract class GetPacketStatusDepends<PT, RT> extends BaseAction<PT, RT>
|
||||
// TODO: add error stack?
|
||||
return {
|
||||
valid: false,
|
||||
message: "packetBackend不可用,请参照文档 https://napneko.github.io/config/advanced 和启动日志检查packetBackend状态或进行配置!",
|
||||
message: "packetBackend不可用,请参照文档 https://napneko.github.io/config/advanced 和启动日志检查packetBackend状态或进行配置!" +
|
||||
"错误堆栈信息:" + this.core.apis.PacketApi.clientLogStack,
|
||||
};
|
||||
}
|
||||
return await super.check(payload);
|
||||
|
||||
@@ -83,7 +83,7 @@ export class NapCatOneBot11Adapter {
|
||||
async registerNative(core: NapCatCore, context: InstanceContext) {
|
||||
try {
|
||||
this.nativeCore = new Native(context.pathWrapper.binaryPath);
|
||||
if (!this.nativeCore.inited) throw new Error('Native Not Init');
|
||||
// if (!this.nativeCore.inited) throw new Error('Native Not Init');
|
||||
this.nativeCore.registerRecallCallback(async (hex: string) => {
|
||||
try {
|
||||
// TODO: refactor!
|
||||
@@ -346,10 +346,10 @@ export class NapCatOneBot11Adapter {
|
||||
}
|
||||
};
|
||||
msgListener.onKickedOffLine = async (kick) => {
|
||||
let event = new BotOfflineEvent(this.core, kick.tipsTitle, kick.tipsDesc);
|
||||
const event = new BotOfflineEvent(this.core, kick.tipsTitle, kick.tipsDesc);
|
||||
this.networkManager.emitEvent(event)
|
||||
.catch(e => this.context.logger.logError.bind(this.context.logger)('处理Bot掉线失败', e));
|
||||
}
|
||||
};
|
||||
this.context.session.getMsgService().addKernelMsgListener(
|
||||
proxiedListenerOf(msgListener, this.context.logger),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user