diff options
author | obscurity <z@x4.pm> | 2022-11-21 02:43:16 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 03:43:16 +0100 |
commit | 58e28b4281f7f9016f7d96d70c52472822453f67 (patch) | |
tree | 22b54f123dc797222b00e558fe65bf1ddf3f8c5b /src | |
parent | bb14d4989d3d8d0c35b568fca7a8fd4e65f4fc07 (diff) | |
download | Vencord-58e28b4281f7f9016f7d96d70c52472822453f67.tar.gz Vencord-58e28b4281f7f9016f7d96d70c52472822453f67.tar.bz2 Vencord-58e28b4281f7f9016f7d96d70c52472822453f67.zip |
feat(fakeNitro): add an option to change emote sizes (#225)
closes https://github.com/Vendicated/Vencord/issues/204
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/fakeNitro.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index 3ec8dc5..c682324 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -60,7 +60,7 @@ migratePluginSettings("FakeNitro", "NitroBypass"); export default definePlugin({ name: "FakeNitro", - authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven], + authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven, Devs.obscurity], description: "Allows you to stream in nitro quality and send fake emojis/stickers.", dependencies: ["MessageEventsAPI"], @@ -125,6 +125,12 @@ export default definePlugin({ default: true, restartNeeded: true, }, + emojiSize: { + description: "Size of the emojis when sending", + type: OptionType.SLIDER, + default: 48, + markers: [32, 48, 64, 128, 160, 256, 512], + }, enableStickerBypass: { description: "Allow sending fake stickers", type: OptionType.BOOLEAN, @@ -270,7 +276,7 @@ export default definePlugin({ if (emoji.guildId === guildId && !emoji.animated) continue; const emojiString = `<${emoji.animated ? "a" : ""}:${emoji.originalName || emoji.name}:${emoji.id}>`; - const url = emoji.url.replace(/\?size=\d+/, "?size=48"); + const url = emoji.url.replace(/\?size=\d+/, `?size=${Settings.plugins.FakeNitro.emojiSize}`); messageObj.content = messageObj.content.replace(emojiString, (match, offset, origStr) => { return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`; }); @@ -289,7 +295,7 @@ export default definePlugin({ if (emoji == null || (emoji.guildId === guildId && !emoji.animated)) continue; if (!emoji.require_colons) continue; - const url = emoji.url.replace(/\?size=\d+/, "?size=48"); + const url = emoji.url.replace(/\?size=\d+/, `?size=${Settings.plugins.FakeNitro.emojiSize}`); messageObj.content = messageObj.content.replace(emojiStr, (match, offset, origStr) => { return `${getWordBoundary(origStr, offset - 1)}${url}${getWordBoundary(origStr, offset + match.length)}`; }); |