From 10f4e309040b3a5f8922168c288b64658a4efb8c Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sat, 6 May 2023 12:42:09 +0200 Subject: Updated includes/external/matrix/index.js (automated) --- includes/external/matrix/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'includes') diff --git a/includes/external/matrix/index.js b/includes/external/matrix/index.js index b8ae194..cd26a87 100644 --- a/includes/external/matrix/index.js +++ b/includes/external/matrix/index.js @@ -15,6 +15,12 @@ const client = sdk.createClient({ userId: "@" + user + ":equestria.dev" }); +function sleep(ms) { + return new Promise((res, rej) => { + setTimeout(res, ms); + }); +} + client.once("sync", async function (state, prevState, res) { if (state === "PREPARED") { console.log("Ready"); @@ -56,6 +62,8 @@ client.once("sync", async function (state, prevState, res) { } }); + await sleep(2000); + console.log("Uploading avatar"); let pfp; -- cgit