PronounDB: Source pronouns from both PronounDB & Discord (#1301)

* PronounDB: Source pronouns from both PronounDB & Discord

* jdsjdsajjasiofigvjodsjigfdjiogegjnegjnersjn
This commit is contained in:
V 2023-06-17 03:50:59 +02:00 committed by GitHub
parent 7e8397a4da
commit e4162e7bd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 22 deletions

View file

@ -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"
}
}
],