From d181e9d98aa903df47d1a15c28c2a6cf586c31dc Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sun, 12 Jul 2020 13:59:59 +0200 Subject: [PATCH] example report new members to botadmin --- mycommands.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mycommands.sh b/mycommands.sh index 3084104..30c2ac2 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-1-gef4d21f +#### $$VERSION$$ v0.99-dev2-2-g78088d6 # # uncomment the following lines to overwrite info and help messages @@ -56,6 +56,9 @@ export SILENCER="no" # export WELCOME_NEWMEMBER="yes" WELCOME_MSG="Welcome" +# uncomment if you want to be informed about new chat members +# export REPORT_NEWMEMBER="yes" + # messages for admin only commands NOTADMIN="Sorry, this command is allowed for admin or owner only" NOTBOTADMIN="Sorry, this command is allowed for bot owner only" @@ -136,6 +139,8 @@ else "${WELCOME_MSG} ${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]} (@${NEWMEMBER[USERNAME]})" MYSENTID="${BOTSENT[ID]}" { sleep 5; delete_message "${CHAT[ID]}" "${MYSENTID}"; } & + [ -n "${REPORT_NEWMEMBER}" ] && send_normal_message "$(getConfigKey "botadmin")"\ + "New member chat ${CHAT[NAME]} (${CHAT[ID]}): ${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]} (@${NEWMEMBER[USERNAME]})" fi ;; esac