fix: log config

This commit is contained in:
linyuchen
2024-04-27 12:20:17 +08:00
parent 6cc2bacbe7
commit 47a90b600f
5 changed files with 20 additions and 18 deletions

View File

@@ -27,8 +27,6 @@ export interface OB11Config {
save(config: OB11Config): void;
}
const ob11ConfigDir = path.resolve(__dirname, 'config');
fs.mkdirSync(ob11ConfigDir, { recursive: true });
class Config extends ConfigBase<OB11Config> implements OB11Config {
httpPort: number = 3000;
@@ -49,7 +47,7 @@ class Config extends ConfigBase<OB11Config> implements OB11Config {
token = '';
getConfigPath() {
return path.join(ob11ConfigDir, `onebot11_${selfInfo.uin}.json`);
return path.join(this.getConfigDir(), `onebot11_${selfInfo.uin}.json`);
}
}

View File

@@ -48,7 +48,7 @@ export class NapCatOnebot11 {
WebSocket反向服务 ${ob11Config.enableWsReverse ? '已启动' : '未启动'}, 反向地址: ${ob11Config.wsReverseUrls}
`;
log(serviceInfo);
NTQQUserApi.getUserDetailInfo(selfInfo.uin).then(user => {
NTQQUserApi.getUserDetailInfo(selfInfo.uid).then(user => {
selfInfo.nick = user.nick;
}).catch(logError);
if (ob11Config.enableHttp) {