Vencord/src/plugins/apiMessageAccessories.ts

19 lines
602 B
TypeScript
Raw Normal View History

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`,
},
},
],
});