diff --git a/src/plugins/_api/messagePopover.ts b/src/plugins/_api/messagePopover.ts index be4b6393a..42a1bb765 100644 --- a/src/plugins/_api/messagePopover.ts +++ b/src/plugins/_api/messagePopover.ts @@ -27,12 +27,8 @@ export default definePlugin({ find: "Messages.MESSAGE_UTILITIES_A11Y_LABEL", replacement: { // foo && !bar ? createElement(reactionStuffs)... createElement(blah,...makeElement(reply-other)) - match: /\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"/, - replace: (m, makeElement) => { - const msg = m.match(/message:(.{1,3}),/)?.[1]; - if (!msg) throw new Error("Could not find message variable"); - return `...Vencord.Api.MessagePopover._buildPopoverElements(${msg},${makeElement}),${m}`; - } + match: /\i&&!\i\?\(0,\i\.jsxs?\)\(.{0,200}renderEmojiPicker:.{0,500}\?(\i)\(\{key:"reply-other"(?<=message:(\i).+?)/, + replace: (m, makeElement, msg) => `...Vencord.Api.MessagePopover._buildPopoverElements(${msg},${makeElement}),${m}` } }], });