Skip to content

Download Photo with Maximum quality #197

@liveinno

Description

@liveinno

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!```

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions