Fix Patches & Add favorite servers to fakenitro (might work)

This commit is contained in:
thororen1234 2026-03-04 18:35:54 -05:00
parent 1abdfb4c6a
commit 0e05560f41
No known key found for this signature in database
3 changed files with 17 additions and 11 deletions

View file

@ -265,7 +265,7 @@ export default definePlugin({
// Create the isBetterFolders and betterFoldersExpandedIds variables in the GuildsBar component
// Needed because we access this from a non-arrow closure so we can't use arguments[0]
{
match: /let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i,)/,
match: /let{disableAppDownload:\i=\i\.isPlatformEmbedded,isOverlay:.+?(?=}=\i)/,
replace: "$&,isBetterFolders,betterFoldersExpandedIds"
},
// Export the isBetterFolders and betterFoldersExpandedIds variable to the Guild List component

View file

@ -87,14 +87,6 @@ export default definePlugin({
replace: (_, rest) => `${rest}onClick:()=>{}`
}
},
// Make the Favourites Server experiment allow favouriting DMs and threads
{
find: "useCanFavoriteChannel",
replacement: {
match: /(?<=isFavorite\(\i\.id\).{0,5})\i\.isThread\(\)/,
replace: "false",
}
},
// Enable experiment embed on sent experiment links
{
find: "Clear Treatment ",

View file

@ -141,7 +141,12 @@ const settings = definePluginSettings({
description: "Whether to disable the embed permission check when sending fake emojis and stickers",
type: OptionType.BOOLEAN,
default: false
}
},
enableFavoriteServersBypass: {
description: "Allow favoriting servers without nitro",
type: OptionType.BOOLEAN,
default: true
},
});
function hasPermission(channelId: string, permission: bigint) {
@ -376,7 +381,16 @@ export default definePlugin({
match: /(?<=type:"(?:SOUNDBOARD_SOUNDS_RECEIVED|GUILD_SOUNDBOARD_SOUND_CREATE|GUILD_SOUNDBOARD_SOUND_UPDATE|GUILD_SOUNDBOARD_SOUNDS_UPDATE)".+?available:)\i\.available/g,
replace: "true"
}
}
},
// Might bypass favorites req
{
find: ".favoriteAdded,notifyFavoriteAdded:",
predicate: () => settings.store.enableFavoriteServersBypass,
replacement: {
match: /(?<=getCurrentUser\(\)\),\i=).{0,25}\.PremiumTypes.TIER_2\)/,
replace: "true",
}
},
],
get guildId() {