fix OnePingPerDM (#3648)
also removes a now obsolete patch from FakeNitro
This commit is contained in:
parent
26074b7f18
commit
1cfc3fb8f8
2 changed files with 15 additions and 12 deletions
|
|
@ -159,7 +159,6 @@ function makeBypassPatches(): Omit<Patch, "plugin"> {
|
|||
{ func: "canUseHighVideoUploadQuality", predicate: () => settings.store.enableStreamQualityBypass },
|
||||
{ func: "canStreamQuality", predicate: () => settings.store.enableStreamQualityBypass },
|
||||
{ func: "canUseClientThemes" },
|
||||
{ func: "canUseCustomNotificationSounds" },
|
||||
{ func: "canUsePremiumAppIcons" }
|
||||
];
|
||||
|
||||
|
|
@ -176,7 +175,7 @@ function makeBypassPatches(): Omit<Patch, "plugin"> {
|
|||
export default definePlugin({
|
||||
name: "FakeNitro",
|
||||
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven, Devs.fawn, Devs.captain, Devs.Nuckyz, Devs.AutumnVN],
|
||||
description: "Allows you to stream in nitro quality, send fake emojis/stickers, use client themes and custom Discord notifications.",
|
||||
description: "Allows you to stream in nitro quality, send fake emojis/stickers, and use client themes.",
|
||||
dependencies: ["MessageEventsAPI"],
|
||||
|
||||
settings,
|
||||
|
|
|
|||
|
|
@ -38,17 +38,21 @@ export default definePlugin({
|
|||
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",
|
||||
authors: [Devs.ProffDea],
|
||||
settings,
|
||||
patches: [{
|
||||
find: ".getDesktopType()===",
|
||||
replacement: [{
|
||||
match: /(\i\.\i\.getDesktopType\(\)===\i\.\i\.NEVER)\)/,
|
||||
replace: "$&if(!$self.isPrivateChannelRead(arguments[0]?.message))return;else "
|
||||
},
|
||||
patches: [
|
||||
{
|
||||
match: /sound:(\i\?\i:void 0,soundpack:\i,volume:\i,onClick)/,
|
||||
replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"
|
||||
}]
|
||||
}],
|
||||
find: ".getDesktopType()===",
|
||||
replacement: [
|
||||
{
|
||||
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)/,
|
||||
replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
isPrivateChannelRead(message: MessageJSON) {
|
||||
const channelType = ChannelStore.getChannel(message.channel_id)?.type;
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue