Updated commandPreprocessor to mark all emotes instead of just site-wide ones.
This commit is contained in:
parent
c3d016e1af
commit
6a10bf3dea
|
|
@ -64,7 +64,7 @@ class commandPreprocessor{
|
||||||
//Inject emote links into the message
|
//Inject emote links into the message
|
||||||
this.message = this.message.replaceAll(`[${emote.name}]`, emote.link);
|
this.message = this.message.replaceAll(`[${emote.name}]`, emote.link);
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
processLinks(){
|
processLinks(){
|
||||||
|
|
@ -108,13 +108,16 @@ class commandPreprocessor{
|
||||||
//Create an empty variable to hold the found emote
|
//Create an empty variable to hold the found emote
|
||||||
var foundEmote = null;
|
var foundEmote = null;
|
||||||
|
|
||||||
//For every site-wide emote
|
//For each list of emotes
|
||||||
this.emotes.site.forEach((emote) => {
|
Object.keys(this.emotes).forEach((key) => {
|
||||||
//if we found a match
|
//For each emote in the current list
|
||||||
if(emote.link == link){
|
this.emotes[key].forEach((emote) => {
|
||||||
//return the match
|
//if we found a match
|
||||||
foundEmote = emote;
|
if(emote.link == link){
|
||||||
}
|
//return the match
|
||||||
|
foundEmote = emote;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return foundEmote;
|
return foundEmote;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue