-
Notifications
You must be signed in to change notification settings - Fork 132
Open
Description
Hi, pls help me
User send to chat photo/images, how to download this photos? I read docs:
# download from Telegram server
# photo received in a chat
photo="${URLS[PHOTO]}")"
echo "$photo" -> photo/file_1234.jpg
# first download
file="$(download_file "${photo}"
echo "$file" -> ./data-bot-bash/photo-file_1234.jpg
but this code has syntax error:
photo="${URLS[PHOTO]}")"
And im try to paste:
if user_is_allowed "${USER[ID]}" "info" "${CHAT[ID]}" ; then
send_normal_message "${CHAT[ID]}" "$(date)"
# download from Telegram server
# photo received in a chat
photo="${URLS[PHOTO]}"
echo "$photo" -> photo/file_1234.jpg
# first download
file=$"(download_file ${photo})"
echo "$file" -> ./data-bot-bash/photo-file_1234.jpg
return 0
else
#send_normal_message "${CHAT[ID]}" "You are not allowed to start Bot."
echo "test"
fi
;;```
but its not work
and second question, where edit this message:
```This is @name_bot, the Telegram example bot written entirely in bash.
Edit commands and messages in mycommands.sh!```
Reactions are currently unavailable