Merge pull request #138 from serfend/main

feat[config]support use default-template
This commit is contained in:
手瓜一十雪
2024-07-22 18:22:49 +08:00
committed by GitHub
3 changed files with 23 additions and 12 deletions

View File

@@ -12,17 +12,18 @@ export interface NapCatConfig {
consoleLogLevel: LogLevel,
}
class Config extends ConfigBase<NapCatConfig> implements NapCatConfig{
class Config extends ConfigBase<NapCatConfig> implements NapCatConfig {
fileLog = true;
consoleLog = true;
fileLogLevel = LogLevel.DEBUG;
consoleLogLevel = LogLevel.INFO;
fileLogLevel = LogLevel.DEBUG;
consoleLogLevel = LogLevel.INFO;
constructor() {
super();
}
getConfigPath() {
return path.join(this.getConfigDir(), `napcat_${selfInfo.uin}.json`);
getConfigPath(pathName: string) {
const filename = `napcat${pathName ? "_" : ""}${pathName}.json`
return path.join(this.getConfigDir(), filename);
}
}