Add auto save and load
This commit is contained in:
parent
9cabbc8813
commit
93ac1a980e
4 changed files with 11 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue