aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/apiMessageAccessories.ts
blob: a2e8e7083db8e519179caf5f2b5e74b3d76dda6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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`,
            },
        },
    ],
});