From 6011444a3cd742b32a8f69506881bc805c3222db Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Tue, 4 Aug 2020 08:31:38 +0200 Subject: [PATCH] fix leftchatmember example and message --- bashbot.sh | 4 ++-- mycommands.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 7d7f3c0..13077f8 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ 0.99-5-gaec7345 +#### $$VERSION$$ 0.99-7-gafbdb1e # # Exit Codes: # - 0 success (hopefully) @@ -873,7 +873,7 @@ process_message() { LEFTMEBER[USERNAME]="$(JsonDecode "${UPD["result",${num},"message","left_chat_member","username"]}")" LEFTMEMBER[ISBOT]="${UPD["result",${num},"message","left_chat_member","is_bot"]}" [ -z "${MESSAGE[0]}" ] &&\ - MESSAGE[0]="/_left_chat_member ${NEWMEMBER[ID]} ${LEFTMEMBER[USERNAME]:=${LEFTMEMBER[FIRST_NAME]} ${LEFTMEMBER[LAST_NAME]}}" + MESSAGE[0]="/_left_chat_member ${LEFTMEMBER[ID]} ${LEFTMEMBER[USERNAME]:=${LEFTMEMBER[FIRST_NAME]} ${LEFTMEMBER[LAST_NAME]}}" fi if grep -qs -e '\["result",'"${num}"',"message","new_chat_[tp]' <<<"${UPDATE}"; then SERVICE[NEWTITLE]="$(JsonDecode "${UPD["result",${num},"message","new_chat_title"]}")" diff --git a/mycommands.sh b/mycommands.sh index a4493d8..dd94ce2 100644 --- a/mycommands.sh +++ b/mycommands.sh @@ -8,7 +8,7 @@ # #### if you start to develop your own bot, use the clean version of this file: # #### mycommands.clean # -#### $$VERSION$$ 0.99-4-g15eb311 +#### $$VERSION$$ 0.99-7-gafbdb1e # # uncomment the following lines to overwrite info and help messages @@ -152,7 +152,7 @@ else ;; '/_left_chat_member'*) [ -n "${REPORT_LEFTMEMBER}" ] && send_normal_message "$(getConfigKey "botadmin")"\ - "Left member: ${CHAT[TITLE]} (${CHAT[ID]}): ${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]} (@${NEWMEMBER[USERNAME]})" + "Left member: ${CHAT[TITLE]} (${CHAT[ID]}): ${LEFTMEMBER[FIRST_NAME]} ${LEFTMEMBER[LAST_NAME]} (@${LEFTMEMBER[USERNAME]})" ;; esac