Skip to content

Commit

Permalink
Freemoji: Add 56px emoji size, add name/quality arguments to non-hype…
Browse files Browse the repository at this point in the history
…rlink emoji (#4)

* add 56px emoji size

* add name and higher emoji quality to non-hyperlink emojis
  • Loading branch information
Delphox authored Aug 11, 2024
1 parent 7b71f6e commit 4379692
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion plugins/freemoji/src/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const sizeOptions = {
Tiny: 16,
Small: 32,
Medium: 48,
Big: 56,
Large: 64,
Huge: 96,
Jumbo: 128,
Expand Down Expand Up @@ -61,4 +62,4 @@ export default () => {
</FormSection>
</RN.ScrollView>
)
}
}
4 changes: 2 additions & 2 deletions plugins/freemoji/src/msgProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function extractUnusableEmojis(messageString: string, size: number) {
if (storage.hyperlink === true) {
emojiUrls.push(`[${emojiString[1]}](https://cdn.discordapp.com/emojis/${emojiString[2]}.${ext}?size=${size}&quality=lossless&name=${emojiString[1]})`);
} else {
emojiUrls.push(`https://cdn.discordapp.com/emojis/${emojiString[2]}.${ext}?size=${size}`);
emojiUrls.push(`https://cdn.discordapp.com/emojis/${emojiString[2]}.${ext}?size=${size}&quality=lossless&name=${emojiString[1]}`);
}
}
}
Expand Down Expand Up @@ -59,4 +59,4 @@ export default function modifyIfNeeded(msg: Message) {

// Set invalidEmojis to empty to prevent Discord yelling to you about you not having nitro
msg.invalidEmojis = [];
};
};

0 comments on commit 4379692

Please sign in to comment.