fixed a bug where external emotes counted towards the limit (twitch)

This commit is contained in:
byron 2024-04-03 17:19:00 -04:00
parent c5d03bab3b
commit bc64dd400a

View file

@ -129,9 +129,15 @@ function getGuildCandidates(data: Data) {
const { emojis } = EmojiStore.getGuilds()[g.id]; const { emojis } = EmojiStore.getGuilds()[g.id];
let count = 0; let count = 0;
for (const emoji of emojis) for (const emoji of emojis) {
if (emoji.animated === isAnimated) count++; if (emoji.animated === isAnimated) {
return count < emojiSlots; 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)); }).sort((a, b) => a.name.localeCompare(b.name));
} }