From aee01f1ca521c37e0c41397312b8dd2dbec0f669 Mon Sep 17 00:00:00 2001 From: Nez27 Date: Wed, 22 Jan 2025 17:55:20 +0700 Subject: [PATCH] update config --- .github/workflows/build.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 60a2deb..f12c996 100755 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -181,6 +181,16 @@ jobs: ${APKS} " - curl -X POST -H "Content-Type: application/json" \ - -d "$(jq -n --arg content "$MSG" '{content: $content}')" \ - "$DISCORD_WEBHOOK_URL" + # Function to send messages in chunks + send_discord_message() { + local message="$1" + while [ ${#message} -gt 0 ]; do + local chunk="${message:0:2000}" # Take the first 2000 characters + curl -X POST -H "Content-Type: application/json" \ + -d "$(jq -n --arg content "$chunk" '{content: $content}')" \ + "$DISCORD_WEBHOOK_URL" + message="${message:2000}" # Remove the sent chunk from the message + done + } + + send_discord_message "$MSG"