mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 09:03:03 -04:00
feat(api): Message Accessories API (#131)
This commit is contained in:
parent
4b1e96b76e
commit
e2b622c76b
3 changed files with 66 additions and 7 deletions
18
src/plugins/apiMessageAccessories.ts
Normal file
18
src/plugins/apiMessageAccessories.ts
Normal file
|
@ -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`,
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue