Updated commandPreprocessor to mark all emotes instead of just site-wide ones.

This commit is contained in:
rainbow napkin 2024-12-21 11:09:08 -05:00
parent c3d016e1af
commit 6a10bf3dea

View file

@ -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;