Skip to content

Commit 1cfc3fb

Browse files
authored
fix OnePingPerDM (#3648)
also removes a now obsolete patch from FakeNitro
1 parent 26074b7 commit 1cfc3fb

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

src/plugins/fakeNitro/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ function makeBypassPatches(): Omit<Patch, "plugin"> {
159159
{ func: "canUseHighVideoUploadQuality", predicate: () => settings.store.enableStreamQualityBypass },
160160
{ func: "canStreamQuality", predicate: () => settings.store.enableStreamQualityBypass },
161161
{ func: "canUseClientThemes" },
162-
{ func: "canUseCustomNotificationSounds" },
163162
{ func: "canUsePremiumAppIcons" }
164163
];
165164

@@ -176,7 +175,7 @@ function makeBypassPatches(): Omit<Patch, "plugin"> {
176175
export default definePlugin({
177176
name: "FakeNitro",
178177
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven, Devs.fawn, Devs.captain, Devs.Nuckyz, Devs.AutumnVN],
179-
description: "Allows you to stream in nitro quality, send fake emojis/stickers, use client themes and custom Discord notifications.",
178+
description: "Allows you to stream in nitro quality, send fake emojis/stickers, and use client themes.",
180179
dependencies: ["MessageEventsAPI"],
181180

182181
settings,

src/plugins/onePingPerDM/index.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,21 @@ export default definePlugin({
3838
description: "If unread messages are sent by a user in DMs multiple times, you'll only receive one audio ping. Read the messages to reset the limit",
3939
authors: [Devs.ProffDea],
4040
settings,
41-
patches: [{
42-
find: ".getDesktopType()===",
43-
replacement: [{
44-
match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,
45-
replace: "$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "
46-
},
41+
patches: [
4742
{
48-
match: /sound:(\i\?\i:void 0,soundpack:\i,volume:\i,onClick)/,
49-
replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"
50-
}]
51-
}],
43+
find: ".getDesktopType()===",
44+
replacement: [
45+
{
46+
match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,
47+
replace: "$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "
48+
},
49+
{
50+
match: /sound:(\i\?\i:void 0,volume:\i,onClick)/,
51+
replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"
52+
}
53+
]
54+
}
55+
],
5256
isPrivateChannelRead(message: MessageJSON) {
5357
const channelType = ChannelStore.getChannel(message.channel_id)?.type;
5458
if (

0 commit comments

Comments
 (0)