SHC: Make Chat Input Bar channel list include hidden channels

This commit is contained in:
Nuckyz 2023-10-27 14:29:25 -03:00
parent 38834ef7ac
commit e05c630a54
No known key found for this signature in database
GPG Key ID: 440BF8296E1C4AD9

View File

@ -414,6 +414,22 @@ export default definePlugin({
}
]
},
{
// Make the chat input bar channel list contain hidden channels
find: ",queryStaticRouteChannels(",
replacement: [
{
// Make the getChannels call to GuildChannelStore return hidden channels
match: /(?<=queryChannels\(\i\){.+?getChannels\(\i)(?=\))/,
replace: ",true"
},
{
// Avoid filtering out hidden channels from the channel list
match: /(?<=queryChannels\(\i\){.+?isGuildChannelType\)\((\i)\.type\))(?=&&!\i\.\i\.can\()/,
replace: "&&!$self.isHiddenChannel($1)"
}
]
},
{
find: "\"^/guild-stages/(\\\\d+)(?:/)?(\\\\d+)?\"",
replacement: {