From 3d42e83e3e71bb29f3f93fe780e4184a82b65298 Mon Sep 17 00:00:00 2001 From: justine Date: Tue, 11 Feb 2025 11:33:17 +0100 Subject: [PATCH] Update webhook.sh Added a command block --- webhook.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/webhook.sh b/webhook.sh index 07e15bb..ab89d7e 100644 --- a/webhook.sh +++ b/webhook.sh @@ -1,15 +1,19 @@ #!/bin/bash WEBHOOK='https://discord.com/api/webhooks/1338109049413308526/YOURWEBHOOKHEREDARLING' +begin="Command result: +\`\`\` +" + ending=" +\`\`\` <@635539351324983374> -# Sent from $(hostname) @ $(date)" #Read from pipe while read content; do - MSG=$(jq -n -r --arg msg "$content $ending" '{content: $msg}') - echo $MSG + MSG=$(jq -n -r --arg msg "$begin$content$ending" '{content: $msg}') done -curl -X POST -H "Content-Type: application/json" --data "$MSG" $WEBHOOK \ No newline at end of file +curl -X POST -H "Content-Type: application/json" --data "$MSG" $WEBHOOK