From e71fcc301067a0f9fb54aa25dbd8b7430237a86b Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 28 Mar 2024 04:21:52 +0100 Subject: [PATCH 1/2] Fix FakeNitro --- src/plugins/_api/messageEvents.ts | 2 +- src/plugins/_api/notices.ts | 2 +- src/plugins/fakeNitro/index.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/_api/messageEvents.ts b/src/plugins/_api/messageEvents.ts index 1b4a2d15a..48ae062c7 100644 --- a/src/plugins/_api/messageEvents.ts +++ b/src/plugins/_api/messageEvents.ts @@ -35,7 +35,7 @@ export default definePlugin({ } }, { - find: ".handleSendMessage=", + find: ".handleSendMessage", replacement: { // props.chatInputType...then((function(isMessageValid)... var parsedMessage = b.c.parse(channel,... var replyOptions = f.g.getSendMessageOptionsForReply(pendingReply); // Lookbehind: validateMessage)({openWarningPopout:..., type: i.props.chatInputType, content: t, stickers: r, ...}).then((function(isMessageValid) diff --git a/src/plugins/_api/notices.ts b/src/plugins/_api/notices.ts index 0648afa04..90ae6ded9 100644 --- a/src/plugins/_api/notices.ts +++ b/src/plugins/_api/notices.ts @@ -26,7 +26,7 @@ export default definePlugin({ required: true, patches: [ { - find: 'displayName="NoticeStore"', + find: '"NoticeStore"', replacement: [ { match: /\i=null;(?=.{0,80}getPremiumSubscription\(\))/g, diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 30744276e..8db449cdd 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -214,7 +214,7 @@ export default definePlugin({ { // Make the emoji always available if the intention allows it match: /if\(!\i\.available/, - replace: m => `${m}&&(typeof fakeNitroIntention==="undefined"||![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))` + replace: m => `${m}&&(typeof fakeNitroIntention==="undefined"||![${1},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))` } ] }, @@ -277,7 +277,7 @@ export default definePlugin({ } }, { - find: '.displayName="UserSettingsProtoStore"', + find: '"UserSettingsProtoStore"', replacement: [ { // Overwrite incoming connection settings proto with our local settings From 82ab3ad1b9bdf531215221408e13444024b62a19 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 28 Mar 2024 05:18:00 +0100 Subject: [PATCH 2/2] i may be stupid :3 --- src/plugins/fakeNitro/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 8db449cdd..d6028aa76 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -214,7 +214,7 @@ export default definePlugin({ { // Make the emoji always available if the intention allows it match: /if\(!\i\.available/, - replace: m => `${m}&&(typeof fakeNitroIntention==="undefined"||![${1},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))` + replace: m => `${m}&&(typeof fakeNitroIntention==="undefined"||![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))` } ] },