diff --git a/config.example.sh b/config.example.sh index 01b45c3..23f5ecf 100644 --- a/config.example.sh +++ b/config.example.sh @@ -1,4 +1,6 @@ -#!/bin/bash +!/bin/bash + +DISCORD_SERVER_NAME="" DISCORD_GENERAL_HOOK="" diff --git a/discord.sh b/discord.sh index 42d1f58..c9f395b 100755 --- a/discord.sh +++ b/discord.sh @@ -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'