MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / saveConfig

Method saveConfig

autodelcmd/autodelcmd.ts:260–270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

258 await fs.mkdir(path.dirname(CONFIG_FILE_PATH), { recursive: true });
259 await fs.writeFile(
260 CONFIG_FILE_PATH,
261 JSON.stringify(this.config, null, 2)
262 );
263 } catch (error) {
264 console.error("[autodelcmd] 保存配置失败:", error);
265 }
266 }
267
268 private async loadExitMessages(): Promise<ExitMessageData[]> {
269 try {
270 await fs.access(EXIT_MSG_FILE_PATH);
271 const data = await fs.readFile(EXIT_MSG_FILE_PATH, "utf-8");
272 return JSON.parse(data);
273 } catch (error) {

Callers 5

loadConfigMethod · 0.95
addCustomRuleMethod · 0.95
removeCustomRuleByIdMethod · 0.95
setEnabledMethod · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected