feat[config]support use default-template

This commit is contained in:
汉广 committed 2024-07-20 23:43:32 +08:00
1 parent cc931bb808
commit 0e47ffdd55
3 files changed
+23 -12

No files matched your search

+6 -5
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);
}
}