aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/setEmote.js
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/client/setEmote.js')
-rw-r--r--webAO/client/setEmote.js6
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;