fix: onePingPerDM (#1867)

This commit is contained in:
Dea 2023-10-25 15:19:09 +00:00 committed by Luna
parent 970acf1bbc
commit ebc73026b3

View file

@ -45,11 +45,11 @@ export default definePlugin({
patches: [{ patches: [{
find: ".getDesktopType()===", find: ".getDesktopType()===",
replacement: [{ replacement: [{
match: /if\((\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\){/, match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,
replace: "if($1){if(!$self.isPrivateChannelRead(arguments[0]?.message))return;" replace: "$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "
}, },
{ {
match: /sound:(\i\?\i:void 0,volume:\i,onClick:)/, match: /sound:(\i\?\i:void 0,volume:\i,onClick)/,
replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1" replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"
}] }]
}], }],