mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 00:53:04 -04:00
refactor: update plugins to use $self
(#478)
Co-authored-by: Ven <vendicated@riseup.net>
This commit is contained in:
parent
1d995e58f5
commit
d95be1acba
19 changed files with 26 additions and 26 deletions
|
@ -38,7 +38,7 @@ export default definePlugin({
|
|||
find: "showCommunicationDisabledStyles",
|
||||
replacement: {
|
||||
match: /(?<=return\s*\(0,\w{1,3}\.jsxs?\)\(.+!\w{1,3}&&)(\(0,\w{1,3}.jsxs?\)\(.+?\{.+?\}\))/,
|
||||
replace: "[$1, Vencord.Plugins.plugins.PronounDB.PronounsChatComponent(e)]"
|
||||
replace: "[$1, $self.PronounsChatComponent(e)]"
|
||||
}
|
||||
},
|
||||
// Hijack the discord pronouns section (hidden without experiment) and add a wrapper around the text section
|
||||
|
@ -46,7 +46,7 @@ export default definePlugin({
|
|||
find: ".Messages.BOT_PROFILE_SLASH_COMMANDS",
|
||||
replacement: {
|
||||
match: /\(0,.\.jsx\)\((?<PronounComponent>.{1,2}\..),(?<pronounProps>{currentPronouns.+?:(?<fullProps>.{1,2})\.pronouns.+?})\)/,
|
||||
replace: "$<fullProps>&&Vencord.Plugins.plugins.PronounDB.PronounsProfileWrapper($<PronounComponent>,$<pronounProps>,$<fullProps>)"
|
||||
replace: "$<fullProps>&&$self.PronounsProfileWrapper($<PronounComponent>,$<pronounProps>,$<fullProps>)"
|
||||
}
|
||||
},
|
||||
// Make pronouns experiment be enabled by default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue