From 4d5b79283c5b57b59f8a4ba3a62ba78901e15fb6 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sun, 12 Jul 2020 15:18:11 +0200 Subject: [PATCH] example report left chat member --- mycommands.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mycommands.sh b/mycommands.sh index 84bd010..c71d0d8 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$$ v0.99-dev2-3-gd181e9d +#### $$VERSION$$ v0.99-dev2-4-g80b94f4 # # uncomment the following lines to overwrite info and help messages @@ -56,8 +56,9 @@ export SILENCER="no" # export WELCOME_NEWMEMBER="yes" WELCOME_MSG="Welcome" -# uncomment if you want to be informed about new chat members +# uncomment if you want to be informed about new/left chat members # export REPORT_NEWMEMBER="yes" +# export REPORT_LEFTMEMBER="yes" # messages for admin only commands NOTADMIN="Sorry, this command is allowed for admin or owner only" @@ -143,6 +144,10 @@ else "New member: ${CHAT[TITLE]} (${CHAT[ID]}): ${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]} (@${NEWMEMBER[USERNAME]})" fi ;; + '/_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]})" + ;; esac case "${MESSAGE}" in