Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 709ef9885b | |||
| 001173037e |
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
Reference in New Issue
Block a user