Fix MessageEventsAPI broken patch
This commit is contained in:
parent
0c89314d49
commit
d9e2732a8d
1 changed files with 3 additions and 3 deletions
|
|
@ -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};"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue