diff --git a/package.json b/package.json index 025fa13d4..78370f097 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vencord", "private": "true", - "version": "1.7.3", + "version": "1.7.4", "description": "The cutest Discord client mod", "homepage": "https://github.com/Vendicated/Vencord#readme", "bugs": { diff --git a/src/plugins/alwaysTrust/index.ts b/src/plugins/alwaysTrust/index.ts index 5113935f4..b195e8ebf 100644 --- a/src/plugins/alwaysTrust/index.ts +++ b/src/plugins/alwaysTrust/index.ts @@ -41,7 +41,7 @@ export default definePlugin({ authors: [Devs.zt, Devs.Trwy], patches: [ { - find: ".displayName=\"MaskedLinkStore\"", + find: '="MaskedLinkStore",', replacement: { match: /(?<=isTrustedDomain\(\i\){)return \i\(\i\)/, replace: "return true" diff --git a/src/plugins/betterGifAltText/index.ts b/src/plugins/betterGifAltText/index.ts index 8b4116318..f0090343e 100644 --- a/src/plugins/betterGifAltText/index.ts +++ b/src/plugins/betterGifAltText/index.ts @@ -26,7 +26,7 @@ export default definePlugin({ "Change GIF alt text from simply being 'GIF' to containing the gif tags / filename", patches: [ { - find: "onCloseImage=", + find: '"onCloseImage",', replacement: { match: /(return.{0,10}\.jsx.{0,50}isWindowFocused)/, replace: diff --git a/src/plugins/betterGifPicker/index.ts b/src/plugins/betterGifPicker/index.ts index 09bb570d7..f1608f28c 100644 --- a/src/plugins/betterGifPicker/index.ts +++ b/src/plugins/betterGifPicker/index.ts @@ -15,8 +15,8 @@ export default definePlugin({ { find: ".GIFPickerResultTypes.SEARCH", replacement: [{ - match: "this.state={resultType:null}", - replace: 'this.state={resultType:"Favorites"}' + match: /(?<="state",{resultType:)null/, + replace: '"Favorites"' }] } ] diff --git a/src/plugins/betterSettings/index.tsx b/src/plugins/betterSettings/index.tsx index 6d3c8798e..7d81c6f5c 100644 --- a/src/plugins/betterSettings/index.tsx +++ b/src/plugins/betterSettings/index.tsx @@ -82,7 +82,7 @@ export default definePlugin({ find: "this.renderArtisanalHack()", replacement: [ { // Fade in on layer - match: /(?<=(\i)\.contextType=\i\.AccessibilityPreferencesContext;)/, + match: /(?<=\((\i),"contextType",\i\.AccessibilityPreferencesContext\);)/, replace: "$1=$self.Layer;", predicate: () => settings.store.disableFade }, @@ -107,11 +107,11 @@ export default definePlugin({ ], predicate: () => settings.store.disableFade }, - { // Load menu stuff on hover, not on click + { // Load menu TOC eagerly find: "Messages.USER_SETTINGS_WITH_BUILD_OVERRIDE.format", replacement: { - match: /(?<=handleOpenSettingsContextMenu.{0,250}?\i\.el\(("[^"]+")\)\.then\([^;]*?("\d+").*?Messages\.USER_SETTINGS,)(?=onClick:)/, - replace: "onMouseEnter(){Vencord.Webpack.wreq.el($1).then(()=>Vencord.Webpack.wreq($2));}," + match: /(?<=(\i)\(this,"handleOpenSettingsContextMenu",.{0,100}?openContextMenuLazy.{0,100}?(await Promise\.all[^};]*?\)\)).*?,)(?=\1\(this)/, + replace: "(async ()=>$2)()," }, predicate: () => settings.store.eagerLoad }, diff --git a/src/plugins/decor/index.tsx b/src/plugins/decor/index.tsx index 7b9b4e3bf..5b2b6d0f0 100644 --- a/src/plugins/decor/index.tsx +++ b/src/plugins/decor/index.tsx @@ -49,7 +49,7 @@ export default definePlugin({ }, // Decoration modal module { - find: ".decorationGridItem", + find: ".decorationGridItem,", replacement: [ { match: /(?<==)\i=>{let{children.{20,100}decorationGridItem/, @@ -61,8 +61,8 @@ export default definePlugin({ }, // Remove NEW label from decor avatar decorations { - match: /(?<=\.Section\.PREMIUM_PURCHASE&&\i;if\()(?<=avatarDecoration:(\i).+?)/, - replace: "$1.skuId===$self.SKU_ID||" + match: /(?<=\.Section\.PREMIUM_PURCHASE&&\i)(?<=avatarDecoration:(\i).+?)/, + replace: "||$1.skuId===$self.SKU_ID" } ] }, diff --git a/src/plugins/disableCallIdle/index.ts b/src/plugins/disableCallIdle/index.ts index 904d53b03..d26f72813 100644 --- a/src/plugins/disableCallIdle/index.ts +++ b/src/plugins/disableCallIdle/index.ts @@ -29,7 +29,7 @@ export default definePlugin({ { find: ".Messages.BOT_CALL_IDLE_DISCONNECT", replacement: { - match: /,?(?=this\.idleTimeout=new \i\.Timeout)/, + match: /,?(?=\i\(this,"idleTimeout",new \i\.Timeout\))/, replace: ";return;" } }, diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index f8ea4b04a..344638828 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -64,7 +64,7 @@ export default definePlugin({ } }, { - find: ".isStaff=()", + find: '"isStaff",', predicate: () => settings.store.enableIsStaff, replacement: [ { diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index d6028aa76..eb9931956 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -388,6 +388,14 @@ export default definePlugin({ match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/, replace: "true" } + }, + // Make all Soundboard sounds available + { + find: 'type:"GUILD_SOUNDBOARD_SOUND_CREATE"', + replacement: { + match: /(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g, + replace: "true" + } } ], diff --git a/src/plugins/gifPaste/index.ts b/src/plugins/gifPaste/index.ts index 3e864b31a..5553bf847 100644 --- a/src/plugins/gifPaste/index.ts +++ b/src/plugins/gifPaste/index.ts @@ -29,10 +29,10 @@ export default definePlugin({ authors: [Devs.Ven], patches: [{ - find: ".handleSelectGIF=", + find: '"handleSelectGIF",', replacement: { - match: /\.handleSelectGIF=(\i)=>\{/, - replace: ".handleSelectGIF=$1=>{if (!this.props.className) return $self.handleSelect($1);" + match: /"handleSelectGIF",(\i)=>\{/, + replace: '"handleSelectGIF",$1=>{if (!this.props.className) return $self.handleSelect($1);' } }], diff --git a/src/plugins/ignoreActivities/index.tsx b/src/plugins/ignoreActivities/index.tsx index c04ce1c56..e2262129d 100644 --- a/src/plugins/ignoreActivities/index.tsx +++ b/src/plugins/ignoreActivities/index.tsx @@ -210,10 +210,10 @@ export default definePlugin({ patches: [ { - find: '.displayName="LocalActivityStore"', + find: '="LocalActivityStore",', replacement: [ { - match: /HANG_STATUS.+?(?=!\i\(\i,\i\)&&)(?<=(\i)\.push.+?)/, + match: /HANG_STATUS.+?(?=!\i\(\)\(\i,\i\)&&)(?<=(\i)\.push.+?)/, replace: (m, activities) => `${m}${activities}=${activities}.filter($self.isActivityNotIgnored);` } ] diff --git a/src/plugins/noBlockedMessages/index.ts b/src/plugins/noBlockedMessages/index.ts index f9de3e13c..427f725ca 100644 --- a/src/plugins/noBlockedMessages/index.ts +++ b/src/plugins/noBlockedMessages/index.ts @@ -38,8 +38,8 @@ export default definePlugin({ ] }, ...[ - 'displayName="MessageStore"', - 'displayName="ReadStateStore"' + '="MessageStore",', + '"displayName","ReadStateStore")' ].map(find => ({ find, predicate: () => Settings.plugins.NoBlockedMessages.ignoreBlockedMessages === true, diff --git a/src/plugins/pinDms/components/CreateCategoryModal.tsx b/src/plugins/pinDms/components/CreateCategoryModal.tsx index 309ca69ff..06e1c3568 100644 --- a/src/plugins/pinDms/components/CreateCategoryModal.tsx +++ b/src/plugins/pinDms/components/CreateCategoryModal.tsx @@ -53,7 +53,7 @@ function useCategory(categoryId: string | null, initalChannelId: string | null) setCategory({ id: Toasts.genId(), name: `Pin Category ${categories.length + 1}`, - color: 10070709, + color: DEFAULT_COLOR, collapsed: false, channels: [initalChannelId] }); diff --git a/src/plugins/pinDms/components/contextMenu.tsx b/src/plugins/pinDms/components/contextMenu.tsx index 0f5a198ba..f2bf9fae6 100644 --- a/src/plugins/pinDms/components/contextMenu.tsx +++ b/src/plugins/pinDms/components/contextMenu.tsx @@ -8,7 +8,7 @@ import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/Co import { Menu } from "@webpack/common"; import { addChannelToCategory, canMoveChannelInDirection, categories, isPinned, moveChannel, removeChannelFromCategory } from "../data"; -import { forceUpdate, settings } from "../index"; +import { forceUpdate, PinOrder, settings } from "../index"; import { openCategoryModal } from "./CreateCategoryModal"; function createPinMenuItem(channelId: string) { @@ -52,7 +52,7 @@ function createPinMenuItem(channelId: string) { /> { - !settings.store.sortDmsByNewestMessage && canMoveChannelInDirection(channelId, -1) && ( + settings.store.pinOrder === PinOrder.Custom && canMoveChannelInDirection(channelId, -1) && (