From cf941737d55ee2c08dd809572d6ebcd9281c709c Mon Sep 17 00:00:00 2001 From: mrrfv Date: Thu, 9 Nov 2023 17:04:28 +0100 Subject: [PATCH] Improve compatibility with non-Discord webhooks --- lib/helpers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helpers.js b/lib/helpers.js index 51e8d58..02dd1de 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -27,7 +27,8 @@ if (!globalThis.fetch) { */ async function sendMessageToWebhook(url, message) { // Create the payload object with the message - const payload = { content: message }; + // The message is provided as 2 different properties to improve compatibility with webhook servers outside Discord + const payload = { content: message, body: message }; // Send a POST request to the webhook url with the payload as JSON try {