mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-22 15:35:09 +00:00
Removed token and added checks
This commit is contained in:
parent
329b248987
commit
89fdfdf14b
@ -12,7 +12,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# If you're in Europe, and public domain does not exist, then haha.
|
||||
|
||||
TOKEN='179533649:AAHR470oLFSDD8WXy8L87uZFofxM6IDp5oU'
|
||||
TOKEN='tokenhere'
|
||||
URL='https://api.telegram.org/bot'$TOKEN
|
||||
|
||||
FORWARD_URL=$URL'/forwardMessage'
|
||||
@ -199,10 +199,12 @@ process_client() {
|
||||
copid="$(cat $copidname 2>/dev/null)"
|
||||
|
||||
if [ "$copid" = "" ]; then
|
||||
[ "${URLS[*]}" != "" ] && {
|
||||
curl -s ${URLS[*]} -o $NAME
|
||||
send_file "${USER[ID]}" "$NAME" "$CAPTION"
|
||||
rm "$NAME"
|
||||
send_location "${USER[ID]}" "${LOCATION[LATITUDE]}" "${LOCATION[LONGITUDE]}"
|
||||
}
|
||||
[ "${LOCATION[*]}" != "" ] && send_location "${USER[ID]}" "${LOCATION[LATITUDE]}" "${LOCATION[LONGITUDE]}"
|
||||
case $MESSAGE in
|
||||
'/question')
|
||||
startproc&
|
||||
@ -224,6 +226,8 @@ Written by @topkecleon, Juan Potato (@awkward_potato), Lorenzo Santina (BigNerd9
|
||||
Contribute to the project: https://github.com/topkecleon/telegram-bot-bash
|
||||
"
|
||||
;;
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
send_message "${USER[ID]}" "$MESSAGE"
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user