mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 23:45:10 +00:00
add exmaple welcome message to mycommands
This commit is contained in:
parent
10f0dea98d
commit
9e89627ae9
@ -74,7 +74,7 @@ Start or Stop your Bot use the following commands:
|
|||||||
./bashbot.sh start
|
./bashbot.sh start
|
||||||
```
|
```
|
||||||
```bash
|
```bash
|
||||||
./bashbot.sh kill
|
./bashbot.sh stop
|
||||||
```
|
```
|
||||||
|
|
||||||
### User stats
|
### User stats
|
||||||
@ -283,5 +283,5 @@ send_action "${CHAT[ID]}" "action"
|
|||||||
#### [Prev Create Bot](1_firstbot.md)
|
#### [Prev Create Bot](1_firstbot.md)
|
||||||
#### [Next Advanced Usage](3_advanced.md)
|
#### [Next Advanced Usage](3_advanced.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.962-114-g595d21f
|
#### $$VERSION$$ v0.962-115-g10f0dea
|
||||||
|
|
||||||
|
@ -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.962-114-g595d21f
|
#### $$VERSION$$ v0.962-115-g10f0dea
|
||||||
#
|
#
|
||||||
|
|
||||||
# uncomment the following lines to overwrite info and help messages
|
# uncomment the following lines to overwrite info and help messages
|
||||||
@ -52,6 +52,10 @@ export SILENCER="no"
|
|||||||
# export REMOVEKEYBOARD="yes"
|
# export REMOVEKEYBOARD="yes"
|
||||||
# export REMOVEKEYBOARD_PRIVATE="yes"
|
# export REMOVEKEYBOARD_PRIVATE="yes"
|
||||||
|
|
||||||
|
# uncomment if you want to say welcome to new chat members
|
||||||
|
# export WELCOME_NEWMEMBER="yes"
|
||||||
|
WELCOME_MSG="Welcome"
|
||||||
|
|
||||||
# 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"
|
||||||
@ -126,6 +130,14 @@ else
|
|||||||
# but if we do, remove /edited_message
|
# but if we do, remove /edited_message
|
||||||
MESSAGE="${MESSAGE#/* }"
|
MESSAGE="${MESSAGE#/* }"
|
||||||
;;
|
;;
|
||||||
|
'/_new_chat_member'*)
|
||||||
|
if [[ -n "${WELCOME_NEWMEMBER}" && "${NEWMEMBER[ISBOT]}" != "true" ]]; then
|
||||||
|
send_normal_message "${CHAT[ID]}"\
|
||||||
|
"${WELCOME_MSG} ${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]} (@${NEWMEMBER[USERNAME]})"
|
||||||
|
MYSENTID="${BOTSENT[ID]}"
|
||||||
|
{ sleep 5; delete_message "${CHAT[ID]}" "${MYSENTID}"; } &
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
case "${MESSAGE}" in
|
case "${MESSAGE}" in
|
||||||
|
Loading…
Reference in New Issue
Block a user