diff --git a/www/js/channel/commandPreprocessor.js b/www/js/channel/commandPreprocessor.js index da423e9..68c0091 100644 --- a/www/js/channel/commandPreprocessor.js +++ b/www/js/channel/commandPreprocessor.js @@ -64,7 +64,7 @@ class commandPreprocessor{ //Inject emote links into the message this.message = this.message.replaceAll(`[${emote.name}]`, emote.link); }); - }) + }); } processLinks(){ @@ -108,13 +108,16 @@ class commandPreprocessor{ //Create an empty variable to hold the found emote var foundEmote = null; - //For every site-wide emote - this.emotes.site.forEach((emote) => { - //if we found a match - if(emote.link == link){ - //return the match - foundEmote = emote; - } + //For each list of emotes + Object.keys(this.emotes).forEach((key) => { + //For each emote in the current list + this.emotes[key].forEach((emote) => { + //if we found a match + if(emote.link == link){ + //return the match + foundEmote = emote; + } + }); }); return foundEmote;