Add auto save and load

This commit is contained in:
Aslan 2025-12-23 07:56:01 -05:00
parent 9cabbc8813
commit 93ac1a980e
4 changed files with 11 additions and 2 deletions

View file

@ -2,6 +2,7 @@ import config from "./config.json" with { type: "json" };
import { MatrixClient, createClient, ClientEvent } from "matrix-js-sdk";
import { registerModules } from "./modules/module.js";
import { load, save } from "./store/store.js";
let matrixClient: MatrixClient | undefined = undefined;
@ -38,4 +39,7 @@ if (initCode > 0) {
process.exit(initCode);
}
load();
setInterval(() => save(), 60000);
listen();