fix hideservers (#241)
Some checks are pending
Test / Test (push) Waiting to run

* Revert "Drop HideServers"

This reverts commit bb8a68b45e.

* Fix HideServers
This commit is contained in:
bep 2025-04-21 16:33:02 -07:00 committed by GitHub
parent ccbe5c16f1
commit a068fb8e8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 448 additions and 3 deletions

View file

@ -32,11 +32,15 @@ export default definePlugin({
}
},
{
find: "#{intl::SERVERS}),children",
find: "#{intl::SERVERS}),gap:\"xs\",children:",
replacement: [
{
match: /(?<=#{intl::SERVERS}\),children:)\i\.map\(\i\)/,
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($&)"
match: /(?<=#{intl::SERVERS}\),gap:"xs",children:)(\i\.map\(.{10,50}?)(}\))/,
replace: "Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.In).concat($1)$2"
},
{
match: /children:.{0,2000}?\{\}\)\]/,
replace: "$&.concat(Vencord.Api.ServerList.renderAll(Vencord.Api.ServerList.ServerListRenderPosition.Below))"
}
]
}