From bc64dd400a38271d06bd426ed0fd8fd7cac0bb08 Mon Sep 17 00:00:00 2001 From: byron <47872200+byeoon@users.noreply.github.com> Date: Wed, 3 Apr 2024 17:19:00 -0400 Subject: [PATCH] fixed a bug where external emotes counted towards the limit (twitch) --- src/plugins/emoteCloner/index.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/emoteCloner/index.tsx b/src/plugins/emoteCloner/index.tsx index f380d0990..27bb1eca2 100644 --- a/src/plugins/emoteCloner/index.tsx +++ b/src/plugins/emoteCloner/index.tsx @@ -129,9 +129,15 @@ function getGuildCandidates(data: Data) { const { emojis } = EmojiStore.getGuilds()[g.id]; let count = 0; - for (const emoji of emojis) - if (emoji.animated === isAnimated) count++; - return count < emojiSlots; + 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)); }