diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-03-05 18:49:59 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 22:49:59 +0100 |
commit | bed5e98bb03a2c7073f9f421a396fa7616d56ac5 (patch) | |
tree | dd862f2649c4a59f9242ab5c73d57221c52c61ec /src/plugins/fakeNitro.ts | |
parent | a5392e5c53675e5206a4d5fcf97b9d6a8d07727b (diff) | |
download | Vencord-bed5e98bb03a2c7073f9f421a396fa7616d56ac5.tar.gz Vencord-bed5e98bb03a2c7073f9f421a396fa7616d56ac5.tar.bz2 Vencord-bed5e98bb03a2c7073f9f421a396fa7616d56ac5.zip |
Misc fixes and improvements (#555)
Co-authored-by: Ven <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/fakeNitro.ts')
-rw-r--r-- | src/plugins/fakeNitro.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/fakeNitro.ts b/src/plugins/fakeNitro.ts index 22ffb80..a09a95a 100644 --- a/src/plugins/fakeNitro.ts +++ b/src/plugins/fakeNitro.ts @@ -87,11 +87,11 @@ export default definePlugin({ }, { match: /(?<=\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i)(?=\))/g, - replace: ",fakeNitroIntention" + replace: ',typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0' }, { match: /(?<=&&!\i&&)!(?<canUseExternal>\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/, - replace: `(!$<canUseExternal>&&![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))` + replace: `(!$<canUseExternal>&&(typeof fakeNitroIntention==="undefined"||![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)))` } ] }, @@ -100,7 +100,7 @@ export default definePlugin({ predicate: () => Settings.plugins.FakeNitro.enableEmojiBypass === true, replacement: { match: /(?<=(?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\((?<user>\i))\){(?<premiumCheck>.+?\))/g, - replace: `,fakeNitroIntention){$<premiumCheck>||fakeNitroIntention===undefined||[${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)` + replace: `,fakeNitroIntention){$<premiumCheck>||fakeNitroIntention==null||[${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)` } }, { |