mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 13:11:41 +00:00
Update discord.sh
This commit is contained in:
parent
748cb28017
commit
451b290b79
@ -23,12 +23,12 @@ discord_send() {
|
|||||||
_saveaccountconf_mutable DISCORD_WEBHOOK_URL "$DISCORD_WEBHOOK_URL"
|
_saveaccountconf_mutable DISCORD_WEBHOOK_URL "$DISCORD_WEBHOOK_URL"
|
||||||
|
|
||||||
DISCORD_USERNAME="${DISCORD_USERNAME:-$(_readaccountconf_mutable DISCORD_USERNAME)}"
|
DISCORD_USERNAME="${DISCORD_USERNAME:-$(_readaccountconf_mutable DISCORD_USERNAME)}"
|
||||||
if [ -n "$DISCORD_USERNAME" ]; then
|
if [ "$DISCORD_USERNAME" ]; then
|
||||||
_saveaccountconf_mutable DISCORD_USERNAME "$DISCORD_USERNAME"
|
_saveaccountconf_mutable DISCORD_USERNAME "$DISCORD_USERNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DISCORD_AVATAR_URL="${DISCORD_AVATAR_URL:-$(_readaccountconf_mutable DISCORD_AVATAR_URL)}"
|
DISCORD_AVATAR_URL="${DISCORD_AVATAR_URL:-$(_readaccountconf_mutable DISCORD_AVATAR_URL)}"
|
||||||
if [ -n "$DISCORD_AVATAR_URL" ]; then
|
if [ "$DISCORD_AVATAR_URL" ]; then
|
||||||
_saveaccountconf_mutable DISCORD_AVATAR_URL "$DISCORD_AVATAR_URL"
|
_saveaccountconf_mutable DISCORD_AVATAR_URL "$DISCORD_AVATAR_URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -36,10 +36,10 @@ discord_send() {
|
|||||||
|
|
||||||
_content="$(printf "**%s**\n%s" "$_subject" "$_content" | _json_encode)"
|
_content="$(printf "**%s**\n%s" "$_subject" "$_content" | _json_encode)"
|
||||||
_data="{\"content\": \"$_content\" "
|
_data="{\"content\": \"$_content\" "
|
||||||
if [ -n "$DISCORD_USERNAME" ]; then
|
if [ "$DISCORD_USERNAME" ]; then
|
||||||
_data="$_data, \"username\": \"$DISCORD_USERNAME\" "
|
_data="$_data, \"username\": \"$DISCORD_USERNAME\" "
|
||||||
fi
|
fi
|
||||||
if [ -n "$DISCORD_AVATAR_URL" ]; then
|
if [ "$DISCORD_AVATAR_URL" ]; then
|
||||||
_data="$_data, \"avatar_url\": \"$DISCORD_AVATAR_URL\" "
|
_data="$_data, \"avatar_url\": \"$DISCORD_AVATAR_URL\" "
|
||||||
fi
|
fi
|
||||||
_data="$_data}"
|
_data="$_data}"
|
||||||
|
Loading…
Reference in New Issue
Block a user