fix Plugins broken by recent Discord changes (#3569)

Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
sadan4 2025-07-31 16:31:33 -04:00 committed by GitHub
parent 29a2bcbf07
commit cb36cf5706
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 38 additions and 30 deletions

View file

@ -178,7 +178,7 @@ export default definePlugin({
},
// Add the hidden eye icon if the channel is hidden
{
match: /\.name,{.{0,140}\.children.+?:null(?<=,channel:(\i).+?)/,
match: /\.Children\.count.+?:null(?<=,channel:(\i).+?)/,
replace: (m, channel) => `${m},$self.isHiddenChannel(${channel})?$self.HiddenChannelIcon():null`
},
// Make voice channels also appear as muted if they are muted
@ -302,8 +302,8 @@ export default definePlugin({
},
{
// Include the @everyone role in the allowed roles list for Hidden Channels
match: /sortBy.{0,30}?\.filter\(\i=>(?<=channel:(\i).+?)/,
replace: (m, channel) => `${m}$self.isHiddenChannel(${channel})?true:`
match: /getSortedRoles.+?\.filter\(\i=>(?=!)/,
replace: m => `${m}$self.isHiddenChannel(arguments[0].channel)?true:`
},
{
// If the @everyone role has the required permissions, make the array only contain it