fixed an issue where external emotes would count towards the max emote limit

This commit is contained in:
byron 2024-04-03 17:20:37 -04:00
parent 38647087e0
commit 23992bd213

View file

@ -129,8 +129,14 @@ function getGuildCandidates(data: Data) {
const { emojis } = EmojiStore.getGuilds()[g.id];
let count = 0;
for (const emoji of emojis)
if (emoji.animated === isAnimated) count++;
for (const emoji of emojis) {
if (emoji.animated === isAnimated) {
count++;
}
if (emoji.managed === true) {
count--; // twitch emojis do not count towards the limit
}
}
return count < emojiSlots;
}).sort((a, b) => a.name.localeCompare(b.name));
}