diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-28 23:41:56 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-03-28 23:41:56 +0200 |
| commit | 903a13ff5b5beaaf42b4fcf8965eb55b642e1d2a (patch) | |
| tree | 7e7cbf09c1ce6d2539bb2f33a9c3c86f19ce9d48 /webAO/client/setEmote.js | |
| parent | 06ee582c4adefdb35220c63ee4a30444474e9388 (diff) | |
| parent | d3911aa9ad6bc16c70355fe11d1377d636b14565 (diff) | |
Merge branch 'master' into coolloading
Diffstat (limited to 'webAO/client/setEmote.js')
| -rw-r--r-- | webAO/client/setEmote.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webAO/client/setEmote.js b/webAO/client/setEmote.js index 4bbaab7..f682fe5 100644 --- a/webAO/client/setEmote.js +++ b/webAO/client/setEmote.js @@ -1,12 +1,12 @@ import transparentPng from '../constants/transparentPng'; -import fileExistsSync from '../utils/fileExistsSync'; +import fileExists from '../utils/fileExists'; /** * Sets all the img tags to the right sources * @param {*} chatmsg */ -const setEmote = (AO_HOST, client, charactername, emotename, prefix, pair, side) => { +const setEmote = async (AO_HOST, client, charactername, emotename, prefix, pair, side) => { const pairID = pair ? 'pair' : 'char'; const characterFolder = `${AO_HOST}characters/`; const acceptedPositions = ['def', 'pro', 'wit']; @@ -30,7 +30,7 @@ const setEmote = (AO_HOST, client, charactername, emotename, prefix, pair, side) } else { url = `${characterFolder}${encodeURI(charactername)}/${encodeURI(prefix)}${encodeURI(emotename)}${extension}`; } - const exists = fileExistsSync(url); + const exists = await fileExists(url); if (exists) { emoteSelector.src = url; break; |
