diff options
author | Cynthia Foxwell <gamers@riseup.net> | 2022-10-21 16:17:18 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-22 00:17:18 +0200 |
commit | e2b622c76bd3f25f674c4c3ff899bef756cdf6ca (patch) | |
tree | eccb4c0dcb7cf54f3f66504e308a45b217f5aecf /src/plugins | |
parent | 4b1e96b76ee4eea16fcb3b5cae74e173541b3c74 (diff) | |
download | Vencord-e2b622c76bd3f25f674c4c3ff899bef756cdf6ca.tar.gz Vencord-e2b622c76bd3f25f674c4c3ff899bef756cdf6ca.tar.bz2 Vencord-e2b622c76bd3f25f674c4c3ff899bef756cdf6ca.zip |
feat(api): Message Accessories API (#131)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/apiMessageAccessories.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/apiMessageAccessories.ts b/src/plugins/apiMessageAccessories.ts new file mode 100644 index 0000000..a2e8e70 --- /dev/null +++ b/src/plugins/apiMessageAccessories.ts @@ -0,0 +1,18 @@ +import { Devs } from "../utils/constants"; +import definePlugin from "../utils/types"; + +export default definePlugin({ + name: "MessageAccessoriesAPI", + description: "API to add message accessories.", + authors: [Devs.Cyn], + patches: [ + { + find: "_messageAttachmentToEmbedMedia", + replacement: { + match: /\(\)\.container\)},(.+?)\)};return/, + replace: (_, accessories) => + `().container)},Vencord.Api.MessageAccessories._modifyAccessories([${accessories}],this.props))};return`, + }, + }, + ], +}); |