From d9e2732a8defcda19d9142b28524bf3ec6dec3d8 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 11 Aug 2025 15:35:29 -0300 Subject: [PATCH 1/3] Fix MessageEventsAPI broken patch --- src/plugins/_api/messageEvents.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/_api/messageEvents.ts b/src/plugins/_api/messageEvents.ts index e5192763c..3030db039 100644 --- a/src/plugins/_api/messageEvents.ts +++ b/src/plugins/_api/messageEvents.ts @@ -35,10 +35,10 @@ export default definePlugin({ } }, { - find: ".handleSendMessage,onResize", + find: ".handleSendMessage,onResize:", replacement: { - // https://regex101.com/r/hBlXpl/1 - match: /let (\i)=\i\.\i\.parse\((\i),.+?let (\i)=\i\.\i\.getSendMessageOptions\(\{.+?\}\);(?<=\)\(({.+?})\)\.then.+?)/, + // https://regex101.com/r/7iswuk/1 + match: /let (\i)=\i\.\i\.parse\((\i),.+?\.getSendMessageOptions\(\{.+?\}\);(?=.+?(\i)\.flags=)(?<=\)\(({.+?})\)\.then.+?)/, replace: (m, parsedMessage, channel, replyOptions, extra) => m + `if(await Vencord.Api.MessageEvents._handlePreSend(${channel}.id,${parsedMessage},${extra},${replyOptions}))` + "return{shouldClear:false,shouldRefocus:true};" From 27b2e97e3fe8bbac8dffbddcff62743f73457d9d Mon Sep 17 00:00:00 2001 From: Vendicated Date: Tue, 12 Aug 2025 02:55:01 +0200 Subject: [PATCH 2/3] ReviewDB: fix input --- src/plugins/reviewDB/components/ReviewsView.tsx | 6 +++--- src/plugins/reviewDB/style.css | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/reviewDB/components/ReviewsView.tsx b/src/plugins/reviewDB/components/ReviewsView.tsx index 7a7d8d020..42ab09381 100644 --- a/src/plugins/reviewDB/components/ReviewsView.tsx +++ b/src/plugins/reviewDB/components/ReviewsView.tsx @@ -29,8 +29,8 @@ import ReviewComponent from "./ReviewComponent"; const Transforms = findByPropsLazy("insertNodes", "textToText"); const Editor = findByPropsLazy("start", "end", "toSlateRange"); -const ChatInputTypes = findByPropsLazy("FORM"); -const InputComponent = findComponentByCodeLazy("disableThemedBackground", "CHANNEL_TEXT_AREA"); +const ChatInputTypes = findByPropsLazy("FORM", "USER_PROFILE"); +const InputComponent = findComponentByCodeLazy("editorClassName", "CHANNEL_TEXT_AREA"); const createChannelRecordFromServer = findByCodeLazy(".GUILD_TEXT])", "fromServer)"); interface UserProps { @@ -127,7 +127,7 @@ export function ReviewsInputComponent( ) { const { token } = Auth; const editorRef = useRef(null); - const inputType = ChatInputTypes.FORM; + const inputType = ChatInputTypes.USER_PROFILE_REPLY; inputType.disableAutoFocus = true; const channel = createChannelRecordFromServer({ id: "0", type: 1 }); diff --git a/src/plugins/reviewDB/style.css b/src/plugins/reviewDB/style.css index 47ccd0918..bf2fed309 100644 --- a/src/plugins/reviewDB/style.css +++ b/src/plugins/reviewDB/style.css @@ -8,6 +8,7 @@ } .vc-rdb-input { + padding-left: 12px; margin-top: 6px; margin-bottom: 12px; resize: none; @@ -132,4 +133,4 @@ .vc-rdb-block-modal-unblock { cursor: pointer; -} +} \ No newline at end of file From 72329f901cae0e45feb24d9ff38eb2eb8d3756d0 Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Mon, 11 Aug 2025 21:28:19 -0400 Subject: [PATCH 3/3] AccountPanelServerProfile: fix right click menu (#3600) Co-authored-by: Vendicated --- .../accountPanelServerProfile/index.tsx | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/plugins/accountPanelServerProfile/index.tsx b/src/plugins/accountPanelServerProfile/index.tsx index ce9f6b515..57144ec08 100644 --- a/src/plugins/accountPanelServerProfile/index.tsx +++ b/src/plugins/accountPanelServerProfile/index.tsx @@ -11,7 +11,7 @@ import { getCurrentChannel } from "@utils/discord"; import definePlugin, { OptionType } from "@utils/types"; import { User } from "@vencord/discord-types"; import { findComponentByCodeLazy } from "@webpack"; -import { ContextMenuApi, Menu, useEffect, useRef } from "@webpack/common"; +import { ContextMenuApi, Menu } from "@webpack/common"; interface UserProfileProps { popoutProps: Record; @@ -22,7 +22,7 @@ interface UserProfileProps { const UserProfile = findComponentByCodeLazy(".POPOUT,user"); let openAlternatePopout = false; -let accountPanelRef: React.RefObject | null> = { current: null }; +let accountPanelRef: React.RefObject = { current: null }; const AccountPanelContextMenu = ErrorBoundary.wrap(() => { const { prioritizeServerProfile } = settings.use(["prioritizeServerProfile"]); @@ -38,8 +38,7 @@ const AccountPanelContextMenu = ErrorBoundary.wrap(() => { disabled={getCurrentChannel()?.getGuildId() == null} action={e => { openAlternatePopout = true; - accountPanelRef.current?.props.onMouseDown(); - accountPanelRef.current?.props.onClick(e); + accountPanelRef.current?.click(); }} /> ){(.+?)}(?=,position)(?<=currentUser:(\i).+?)/, replace: (_, rest, popoutProps, originalPopout, currentUser) => `${rest}$self.UserProfile({popoutProps:${popoutProps},currentUser:${currentUser},originalRenderPopout:()=>{${originalPopout}}})` @@ -84,8 +79,8 @@ export default definePlugin({ replace: "$&$self.onPopoutClose();" }, { - match: /(?<=#{intl::SET_STATUS}\),)/, - replace: "ref:$self.accountPanelRef,onContextMenu:$self.openAccountPanelContextMenu," + match: /#{intl::SET_STATUS}\)(?<=innerRef:(\i),style:.+?)/, + replace: "$&,onContextMenu:($self.grabRef($1),$self.openAccountPanelContextMenu)" } ] } @@ -95,12 +90,9 @@ export default definePlugin({ return accountPanelRef; }, - useAccountPanelRef() { - useEffect(() => () => { - accountPanelRef.current = null; - }, []); - - return (accountPanelRef = useRef(null)); + grabRef(ref: React.RefObject) { + accountPanelRef = ref; + return ref; }, openAccountPanelContextMenu(event: React.UIEvent) {