mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-02-02 18:38:24 +00:00
fix get_file
This commit is contained in:
parent
9ef99ee1b8
commit
d8e0b5c975
@ -11,7 +11,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v80-rc1-0-gb096ea3
|
#### $$VERSION$$ v80-rc1-2-g9ef99ee
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
@ -187,9 +187,8 @@ delete_message() {
|
|||||||
|
|
||||||
get_file() {
|
get_file() {
|
||||||
[ "$1" = "" ] && return
|
[ "$1" = "" ] && return
|
||||||
local JSON='"file_id": '"${1}"
|
sendJson "" '"file_id": '"${1}""${GETFILE_URL}"
|
||||||
sendJson "" "${JSON}" "${GETFILE_URL}"
|
printf '%s\n' "${URL}"/"$(jsonGetString <<< "${res}" '"result","file_path"')"
|
||||||
jsonGetString <<< "${URL}/""${res}" '"result","file_path"'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# curl is preffered, but may not availible on ebedded systems
|
# curl is preffered, but may not availible on ebedded systems
|
||||||
|
Loading…
x
Reference in New Issue
Block a user