Compare commits

..

2 Commits

Author SHA1 Message Date
lamp 709ef9885b Merge branch 'master' of ssh.gitea.moe:lamp/who-fuck-ping 2026-04-10 19:26:46 -07:00
lamp 001173037e configurable interval 2026-04-10 19:13:10 -07:00
4 changed files with 91 additions and 90 deletions
+1
View File
@@ -6,6 +6,7 @@ create conf.js and paste values
export const ACCESS_TOKEN = ""; // your access token you can get it from element settings
export const SERVER_URL = ""; // your matrix server url without trailing slash i.e. https://matrix-client.matrix.org
export const ROOM_ID = ""; // make a private room and put its id here
export const INTERVAL = 30; // how often to check for new notifications
```
run
+2 -2
View File
@@ -1,4 +1,4 @@
import { ACCESS_TOKEN, SERVER_URL, ROOM_ID } from "./conf.js";
import { ACCESS_TOKEN, SERVER_URL, ROOM_ID, INTERVAL } from "./conf.js";
try {
var last_ts = Number(Deno.readTextFileSync("last_ts"));
@@ -83,5 +83,5 @@ while (true) {
} catch (error) {
console.error(error);
}
await new Promise(r => setTimeout(r, 10000));
await new Promise(r => setTimeout(r, (INTERVAL || 30) * 1000));
}