From cf3c28e1ff32dae2ae3d89338c9a645ae8c96ebd Mon Sep 17 00:00:00 2001 From: Dea Date: Wed, 25 Oct 2023 15:19:09 +0000 Subject: [PATCH] fix: onePingPerDM (#1867) --- src/plugins/onePingPerDM/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/onePingPerDM/index.ts b/src/plugins/onePingPerDM/index.ts index e69620ae..37ca8712 100644 --- a/src/plugins/onePingPerDM/index.ts +++ b/src/plugins/onePingPerDM/index.ts @@ -45,11 +45,11 @@ export default definePlugin({ patches: [{ find: ".getDesktopType()===", replacement: [{ - match: /if\((\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\){/, - replace: "if($1){if(!$self.isPrivateChannelRead(arguments[0]?.message))return;" + match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/, + 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" }] }],