mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 01:23:03 -04:00
PronounDB: Source pronouns from both PronounDB & Discord (#1301)
* PronounDB: Source pronouns from both PronounDB & Discord * jdsjdsajjasiofigvjodsjigfdjiogegjnegjnersjn
This commit is contained in:
parent
7e8397a4da
commit
e4162e7bd5
3 changed files with 60 additions and 22 deletions
|
@ -52,7 +52,7 @@ export default definePlugin({
|
|||
find: ".userTagNoNickname",
|
||||
replacement: {
|
||||
match: /=(\i)\.pronouns/,
|
||||
replace: "=$self.useProfilePronouns($1.user.id)"
|
||||
replace: "=$self.useProfilePronouns($1.user.id,$1.pronouns)"
|
||||
}
|
||||
},
|
||||
// Patch the profile modal username header to use our pronoun hook instead of Discord's pronouns
|
||||
|
@ -60,7 +60,7 @@ export default definePlugin({
|
|||
find: ".USER_PROFILE_ACTIVITY",
|
||||
replacement: {
|
||||
match: /\).showPronouns/,
|
||||
replace: ").showPronouns||true;const vcPronounce=$self.useProfilePronouns(arguments[0].user.id);if(arguments[0].displayProfile)arguments[0].displayProfile.pronouns=vcPronounce"
|
||||
replace: ").showPronouns||true;const vcPronounce=$self.useProfilePronouns(arguments[0].user.id,arguments[0].displayProfile?.pronouns);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue