hope this adds attachment support, if not i may need help

This commit is contained in:
byron 2024-03-15 21:25:15 -04:00
parent 736fef879e
commit 610c48fe92

View file

@ -141,6 +141,7 @@ export default definePlugin({
const webhookUrl = findOption(option, "url"); const webhookUrl = findOption(option, "url");
const webhookMessage = findOption(option, "message"); const webhookMessage = findOption(option, "message");
const webhookAttachment = findOption(option, "attachment");
let webhookUsername = findOption(option, "username"); let webhookUsername = findOption(option, "username");
if (findOption(option, "raw")) { if (findOption(option, "raw")) {
Native.executeWebhook("" + webhookUrl, { Native.executeWebhook("" + webhookUrl, {
@ -154,7 +155,8 @@ export default definePlugin({
content: webhookMessage, content: webhookMessage,
username: webhookUsername, username: webhookUsername,
avatar_url: "", avatar_url: "",
tts: findOption(option, "tts") tts: findOption(option, "tts"),
attachments: webhookAttachment
}); });
} }