Fix multiple plugins for latest Discord update (#2911)

Co-authored-by: Nuckyz <61953774+Nuckyz@users.noreply.github.com>
Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
sadan4 2024-09-25 21:25:48 -04:00 committed by GitHub
parent 1abfb5f0cf
commit bc59fc41b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 68 additions and 67 deletions

View file

@ -444,7 +444,7 @@ export default definePlugin({
}
},
{
find: '="GuildChannelStore",',
find: '"GuildChannelStore"',
replacement: [
{
// Make GuildChannelStore contain hidden channels
@ -453,7 +453,7 @@ export default definePlugin({
},
{
// Filter hidden channels from GuildChannelStore.getChannels unless told otherwise
match: /(?<=getChannels\(\i)(\){.+?)return (.+?)}/,
match: /(?<=getChannels\(\i)(\){.*?)return (.+?)}/,
replace: (_, rest, channels) => `,shouldIncludeHidden${rest}return $self.resolveGuildChannels(${channels},shouldIncludeHidden??arguments[0]==="@favorites");}`
}
]