diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/external/matrix/index.js | 8 |
1 files changed, 8 insertions, 0 deletions
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; |