am amy!!!!
This commit is contained in:
parent
b6089a75ed
commit
0024187d2d
2 changed files with 27 additions and 0 deletions
22
plugins/remixer/index.ts
Normal file
22
plugins/remixer/index.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const {
|
||||
http: {intercept}
|
||||
} = shelter
|
||||
|
||||
|
||||
|
||||
|
||||
const unintercept = intercept("post", /\/channels\/\d+\/messages/, async (req, send) => {
|
||||
if (req.body.attachments) {
|
||||
for (let i = 0; i < req.body.attachments.length; i++) {
|
||||
req.body.attachments[i] = {
|
||||
...req.body.attachments[i],
|
||||
is_remix: true
|
||||
};
|
||||
}
|
||||
}
|
||||
return send(req)
|
||||
})
|
||||
|
||||
export function onUnload() {
|
||||
unintercept()
|
||||
}
|
||||
5
plugins/remixer/plugin.json
Normal file
5
plugins/remixer/plugin.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"name": "remixer",
|
||||
"author": "amy",
|
||||
"description": "set all your attachments as remix"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue