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: "canUseHighVideoUploadQuality", predicate: () => settings.store.enableStreamQualityBypass },
|
||||||
{ func: "canStreamQuality", predicate: () => settings.store.enableStreamQualityBypass },
|
{ func: "canStreamQuality", predicate: () => settings.store.enableStreamQualityBypass },
|
||||||
{ func: "canUseClientThemes" },
|
{ func: "canUseClientThemes" },
|
||||||
{ func: "canUseCustomNotificationSounds" },
|
|
||||||
{ func: "canUsePremiumAppIcons" }
|
{ func: "canUsePremiumAppIcons" }
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -176,7 +175,7 @@ function makeBypassPatches(): Omit<Patch, "plugin"> {
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
name: "FakeNitro",
|
name: "FakeNitro",
|
||||||
authors: [Devs.Arjix, Devs.D3SOX, Devs.Ven, Devs.fawn, Devs.captain, Devs.Nuckyz, Devs.AutumnVN],
|
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"],
|
dependencies: ["MessageEventsAPI"],
|
||||||
|
|
||||||
settings,
|
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",
|
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],
|
authors: [Devs.ProffDea],
|
||||||
settings,
|
settings,
|
||||||
patches: [{
|
patches: [
|
||||||
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,soundpack:\i,volume:\i,onClick)/,
|
find: ".getDesktopType()===",
|
||||||
replace: "sound:!$self.isPrivateChannelRead(arguments[0]?.message)?undefined:$1"
|
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) {
|
isPrivateChannelRead(message: MessageJSON) {
|
||||||
const channelType = ChannelStore.getChannel(message.channel_id)?.type;
|
const channelType = ChannelStore.getChannel(message.channel_id)?.type;
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue