added server name for discord.

This commit is contained in:
2020-04-16 19:54:19 +00:00
parent 60b8c70f3f
commit bbd59ff285
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -1,4 +1,6 @@
#!/bin/bash
!/bin/bash
DISCORD_SERVER_NAME="<YOUR SERVER>"
DISCORD_GENERAL_HOOK="<WEBHOOK_URL_HERE>"
+1 -1
View File
@@ -18,5 +18,5 @@ case $HOOK_ARG in
;;
esac
curl -s -H "Content-Type: application/json" -X POST -d "{\"content\": \"${MESSAGE}\"}" $HOOK_URL | jq -r '.id'
curl -s -H "Content-Type: application/json" -X POST -d "{\"username\": \"${DISCORD_SERVER_NAME}\", \"content\": \"${MESSAGE}\"}" $HOOK_URL | jq -r '.id'