Fix InvisChat, PreviewMsg, SendTimestamps, SilentMsg, SilentType, Translate

This commit is contained in:
Vendicated 2023-10-25 18:34:56 +02:00
parent fbc5038306
commit baf952512c
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
6 changed files with 20 additions and 21 deletions

View file

@ -108,13 +108,13 @@ export default definePlugin({
settings,
patches: [
{
find: ".activeCommandOption",
find: "ChannelTextAreaButtons",
replacement: {
match: /"gift"\)\);(?<=(\i)\.push.+?disabled:(\i),.+?)/,
replace: (m, array, disabled) => `${m};try{${disabled}||${array}.push($self.SilentMessageToggle(arguments[0]));}catch{}`
match: /(\i)\.push.{1,30}disabled:(\i),.{1,20}\},"gift"\)\)/,
replace: "$&,(()=>{try{$2||$1.push($self.chatBarIcon(arguments[0]))}catch{}})()",
}
}
},
],
SilentMessageToggle: ErrorBoundary.wrap(SilentMessageToggle, { noop: true }),
chatBarIcon: ErrorBoundary.wrap(SilentMessageToggle, { noop: true }),
});