mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-27 07:38:25 +00:00
example report new members to botadmin
This commit is contained in:
parent
78088d6472
commit
d181e9d98a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user