+ tg_get_file
parent
c8f9970487
commit
9b5257313b
5
tg.sh
5
tg.sh
|
@ -62,6 +62,11 @@ function tg_get_me() {
|
|||
curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getMe"
|
||||
}
|
||||
|
||||
# tg_get_file(id)
|
||||
function tg_get_file() {
|
||||
curl -s "${API_URL}/file/bot${TELEGRAM_TOKEN}/$(curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getFile?file_id=$1" | jq -r '.result.file_path')"
|
||||
}
|
||||
|
||||
# tg_get_messages(offset, timeout)
|
||||
function _tg_get_updates() {
|
||||
curl -s "${API_URL}/bot${TELEGRAM_TOKEN}/getUpdates?offset=$1&timeout=p" | jq -c '.result[]'
|
||||
|
|
Loading…
Reference in New Issue