From bbd59ff2859fcbf6794801305161755356777ec7 Mon Sep 17 00:00:00 2001 From: Andrew Stowell Date: Thu, 16 Apr 2020 19:54:19 +0000 Subject: [PATCH] added server name for discord. --- config.example.sh | 4 +++- discord.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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'