diff options
author | TymanWasTaken <tbeckman530@gmail.com> | 2022-10-17 10:05:22 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 18:05:22 +0200 |
commit | ae730e83984cbf4dc804eebbf260a055bfe635c0 (patch) | |
tree | 85625f1b4108525f85a61b2ac530e0ae0d234796 /src/plugins/pronoundb/index.ts | |
parent | ad054d5c656967e00191027d729d3570128bb557 (diff) | |
download | Vencord-ae730e83984cbf4dc804eebbf260a055bfe635c0.tar.gz Vencord-ae730e83984cbf4dc804eebbf260a055bfe635c0.tar.bz2 Vencord-ae730e83984cbf4dc804eebbf260a055bfe635c0.zip |
Add pronoundb plugin (#104)
Diffstat (limited to 'src/plugins/pronoundb/index.ts')
-rw-r--r-- | src/plugins/pronoundb/index.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plugins/pronoundb/index.ts b/src/plugins/pronoundb/index.ts new file mode 100644 index 0000000..bc31b48 --- /dev/null +++ b/src/plugins/pronoundb/index.ts @@ -0,0 +1,23 @@ +import definePlugin from "../../utils/types"; +import PronounComponent from "./PronounComponent"; +import { fetchPronouns } from "./utils"; + +export default definePlugin({ + name: "PronounDB", + authors: [{ + name: "Tyman", + id: 487443883127472129n + }], + description: "Adds pronouns to user messages using pronoundb", + patches: [ + { + find: "showCommunicationDisabledStyles", + replacement: { + match: /(?<=return\s+\w{1,3}\.createElement\(.+!\w{1,3}&&)(\w{1,3}.createElement\(.+?\{.+?\}\))/, + replace: "[$1, Vencord.Plugins.plugins.PronounDB.PronounComponent(e)]" + } + } + ], + // Re-export the component on the plugin object so it is easily accessible in patches + PronounComponent +}); |