mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-02-05 03:48:24 +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:
|
# #### if you start to develop your own bot, use the clean version of this file:
|
||||||
# #### mycommands.clean
|
# #### mycommands.clean
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.99-dev2-1-gef4d21f
|
#### $$VERSION$$ v0.99-dev2-2-g78088d6
|
||||||
#
|
#
|
||||||
|
|
||||||
# uncomment the following lines to overwrite info and help messages
|
# uncomment the following lines to overwrite info and help messages
|
||||||
@ -56,6 +56,9 @@ export SILENCER="no"
|
|||||||
# export WELCOME_NEWMEMBER="yes"
|
# export WELCOME_NEWMEMBER="yes"
|
||||||
WELCOME_MSG="Welcome"
|
WELCOME_MSG="Welcome"
|
||||||
|
|
||||||
|
# uncomment if you want to be informed about new chat members
|
||||||
|
# export REPORT_NEWMEMBER="yes"
|
||||||
|
|
||||||
# messages for admin only commands
|
# messages for admin only commands
|
||||||
NOTADMIN="Sorry, this command is allowed for admin or owner only"
|
NOTADMIN="Sorry, this command is allowed for admin or owner only"
|
||||||
NOTBOTADMIN="Sorry, this command is allowed for bot 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]})"
|
"${WELCOME_MSG} ${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]} (@${NEWMEMBER[USERNAME]})"
|
||||||
MYSENTID="${BOTSENT[ID]}"
|
MYSENTID="${BOTSENT[ID]}"
|
||||||
{ sleep 5; delete_message "${CHAT[ID]}" "${MYSENTID}"; } &
|
{ 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
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user