mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 23:45:10 +00:00
add LEFTMEMBER values, doc values
This commit is contained in:
parent
ca0509556a
commit
cdc6dd323d
10
bashbot.sh
10
bashbot.sh
@ -11,7 +11,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.98-dev-6-ge0470aa
|
||||
#### $$VERSION$$ v0.98-dev-7-gca05095
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 sucess (hopefully)
|
||||
@ -765,6 +765,14 @@ process_message() {
|
||||
MESSAGE[0]="/new_chat_member ${NEWMEMBER[USERNAME]:=${NEWMEMBER[FIRST_NAME]} ${NEWMEMBER[LAST_NAME]}}"
|
||||
fi
|
||||
SERVICE[LEFTMEMBER]="${UPD["result",${num},"message","left_chat_member","id"]}"
|
||||
if [ -n "${SERVICE[LEFTMEMBER]}" ]; then
|
||||
LEFTMEBER[ID]="${SERVICE[LEFTMEBER]}"
|
||||
LEFTMEBER[FIRST_NAME]="${UPD["result",${num},"message","left_chat_member","first_name"]}"
|
||||
LEFTMEBER[LAST_NAME]="${UPD["result",${num},"message","left_chat_member","last_name"]}"
|
||||
LEFTMEBER[USERNAME]="${UPD["result",${num},"message","left_chat_member","username"]}"
|
||||
LEFTMEBER[ISBOT]="${UPD["result",${num},"message","left_chat_member","is_bot"]}"
|
||||
MESSAGE[0]="/left_chat_member ${LEFTMEMBER[USERNAME]:=${LEFTMEMBER[FIRST_NAME]} ${LEFTMEMBER[LAST_NAME]}}"
|
||||
fi
|
||||
SERVICE[NEWTILE]="${UPD["result",${num},"message","new_chat_title"]}"
|
||||
SERVICE[NEWPHOTO]="${UPD["result",${num},"message","new_chat_photo"]}"
|
||||
SERVICE[PINNED]="${UPD["result",${num},"message","pinned_message"]}"
|
||||
|
@ -155,11 +155,16 @@ Evertime a Message is received, you can read incoming data using the following v
|
||||
* ```${SERVICE}```: set to "yes" when a service message is recived.
|
||||
* ```${SERVICE[NEWMEMBER]```: New user's id
|
||||
* ```${NEWMEMBER[ID]```: New user's id
|
||||
* ```${NEWMEMBER[FIRSTNAME]```: New user's first name
|
||||
* ```${NEWMEMBER[LASTNAME]```: New user's last name
|
||||
* ```${NEWMEMBER[FIRST_NAME]```: New user's first name
|
||||
* ```${NEWMEMBER[LAST_NAME]```: New user's last name
|
||||
* ```${NEWMEMBER[USERNAME]```: New user's username
|
||||
* ```${NEWMEMBER[ISBOT]```: New user is a bot
|
||||
* ```${SERVICE[LEFTMEMBER]```: Id of user left
|
||||
* ```${LEFTMEBER[ID]```: New user's id
|
||||
* ```${LEFTMEBER[FIRST_NAME]```: New user's first name
|
||||
* ```${LEFTMEBER[LAST_NAME]```: New user's last name
|
||||
* ```${LEFTMEBER[USERNAME]```: New user's username
|
||||
* ```${LEFTMEBER[ISBOT]```: New user is a bot
|
||||
* ```${SERVICE[NEWTILE]```: Text of new title
|
||||
* ```${SERVICE[NEWPHOTO]```: New Chat Picture array
|
||||
* ```${SERVICE[PINNED]```: Pinned Message structure
|
||||
@ -256,5 +261,5 @@ send_action "${CHAT[ID]}" "action"
|
||||
#### [Prev Create Bot](1_firstbot.md)
|
||||
#### [Next Advanced Usage](3_advanced.md)
|
||||
|
||||
#### $$VERSION$$ v0.96-0-g3871ca9
|
||||
#### $$VERSION$$ v0.98-dev-7-gca05095
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user