diff --git a/index.js b/index.js index 655e88b..3c59b90 100644 --- a/index.js +++ b/index.js @@ -86,7 +86,7 @@ function formatUpdateMessage(update) { } // Check for timetable updates -setTimeout(async () => { +setInterval(async () => { const history = await timetable.getUpdates(); const lastCheck = await db.getObjectDefault("/lastTimetableUpdate", 0); const updates = history.filter((entry) => entry.updatedAt > lastCheck); @@ -104,7 +104,7 @@ setTimeout(async () => { client.sendHtmlMessage(roomId, plainText(message), message); } } -}, 1000); +}, 1000 * 60); // Handle events client.on("Room.timeline", async function (event, room) {