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

Method saveExitMessages

autodelcmd/autodelcmd.ts:282–292  ·  view source on GitHub ↗
(exitMsgs: ExitMessageData[])

Source from the content-addressed store, hash-verified

280 await fs.mkdir(path.dirname(EXIT_MSG_FILE_PATH), { recursive: true });
281 await fs.writeFile(
282 EXIT_MSG_FILE_PATH,
283 JSON.stringify(exitMsgs, null, 2)
284 );
285 } catch (error) {
286 console.error("[autodelcmd] 保存退出消息失败:", error);
287 }
288 }
289
290 private async clearExitMessages() {
291 try {
292 await fs.unlink(EXIT_MSG_FILE_PATH);
293 } catch (error) {
294 // 文件不存在时忽略错误
295 if (error.code !== 'ENOENT') {

Callers 2

saveExitMessageMethod · 0.95
removeExitMessageMethod · 0.95

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected