fix various plugins (#4328)

Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
Co-authored-by: Vendicated <vendicated@riseup.net>
This commit is contained in:
sadan4 2026-06-24 12:12:35 -04:00 • committed by GitHub
parent 117b362634
commit f8c9f45f07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 8 deletions

View file

@ -27,7 +27,7 @@ export default definePlugin({
{
find: "#{intl::EDIT_TEXTAREA_HELP}",
replacement: {
match: /(?<=,channel:\i\}\)\.then\().+?(?=\i\.content!==this\.props\.message\.content&&\i\((.+?)\)\})/,
match: /(?<=,channel:\i,message:\i\}\)\.then\().+?(?=\i\.content!==this\.props\.message\.content&&\i\((.+?)\)\})/,
replace: (match, args) => "" +
`async ${match}` +
`if(await Vencord.Api.MessageEvents._handlePreEdit(${args}))` +

View file

@ -51,8 +51,8 @@ export default definePlugin({
find: "80,onlyAnimateOnHoverOrFocus:!",
replacement: [
{
match: /(?<==)\i=>{let{children.{20,200}isSelected:\i.{0,5}\}=\i/,
replace: "$self.DecorationGridItem=$&",
match: /(?=function (\i)\(\i\){let{children.{20,200}isSelected:\i,\.\.\.\i\}=\i)/,
replace: "$self.DecorationGridItem=$1;",
},
{
match: /(?<==)\i=>{let{user:\i,avatarDecoration/,
@ -113,7 +113,7 @@ export default definePlugin({
find: "#{intl::PREMIUM_UPSELL_PROFILE_AVATAR_DECO_INLINE_UPSELL_DESCRIPTION}",
replacement: [
{
match: /(?<==)\i=>{let{user:\i,guildId:\i,avatarDecoration:/,
match: /(?<==)function\(\i\){let{user:\i,guildId:\i,avatarDecoration:/,
replace: "$self.AvatarDecorationModalPreview=$&"
}
]

View file

@ -386,8 +386,8 @@ export default definePlugin({
predicate: () => settings.store.transformEmojis,
replacement: {
// Add the fake nitro emoji notice
match: /(?<=emojiDescription:)(\i)(?<=\1=\(\i=>\{.+?\}\)\((\i)\)[,;].+?)/,
replace: (_, reactNode, props) => `$self.addFakeNotice(${FakeNoticeType.Emoji},${reactNode},!!${props}?.fakeNitroNode?.fake)`
match: /(?<=emojiDescription:)(\i)(?<=\1=function\(\i\)\{let\{sourceType:.+?)/,
replace: (_, reactNode) => `$self.addFakeNotice(${FakeNoticeType.Emoji},${reactNode},!!arguments[0]?.fakeNitroNode?.fake)`
}
},
// Separate patch for allowing using custom app icons

View file

@ -31,7 +31,7 @@ export default definePlugin({
find: '"PLAINTEXT_PREVIEW":"OTHER"',
replacement: {
match: /"IMAGE"===\i\|\|"VIDEO"===\i\|\|"CLIP"===\i/,
replace: "false"
replace: "(false)"
}
},
{

View file

@ -107,7 +107,7 @@ export default definePlugin({
replacement: [
{
// Do not show confirmation to join a voice channel when already connected to another if clicking on a hidden voice channel
match: /(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\)[^;]+?;return\()/,
match: /(?<=getIgnoredUsersForVoiceChannel\((\i)\.id\)[^;]{0,300}?;return\()/,
replace: (_, channel) => `!$self.isHiddenChannel(${channel})&&`
},
{