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

@@ -72,8 +72,9 @@ class Config extends ConfigBase<OB11Config> implements OB11Config {
RecordList: [] as Array<string>
};
getConfigPath() {
return path.join(this.getConfigDir(), `onebot11_${selfInfo.uin}.json`);
getConfigPath(pathName: string) {
const filename = `onebot11_${pathName ? "_" : ""}${pathName}.json`
return path.join(this.getConfigDir(), filename);
}
protected getKeys(): string[] | null {