mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-23 13:48:24 +00:00
add jssh_prinDB and BG send_action
This commit is contained in:
parent
284172fc10
commit
d1f509a00f
@ -5,7 +5,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.94-pre-7-g64efe96
|
||||
#### $$VERSION$$ v0.94-pre-8-g284172f
|
||||
#
|
||||
# source from commands.sh to use jsonDB functions
|
||||
#
|
||||
@ -36,6 +36,12 @@ jssh_writeDB() {
|
||||
Array2Json "$1" >"${DB}"
|
||||
}
|
||||
|
||||
# print ARRAY content to stdout instead of file
|
||||
# $1 ARRAY name, must be delared with "declare -A ARRAY" upfront
|
||||
jssh_printDB() {
|
||||
Array2Json "$1"
|
||||
}
|
||||
|
||||
# update/write ARRAY content in file without deleting keys not in ARRAY
|
||||
# $1 ARRAY name, must be delared with "declare -A ARRAY" upfront
|
||||
# $2 filename (must exist!), must be relative to BASHBOT_ETC, and not contain '..'
|
||||
|
@ -5,7 +5,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.94-pre-2-gc0a633f
|
||||
#### $$VERSION$$ v0.94-pre-8-g284172f
|
||||
|
||||
# source once magic, function named like file
|
||||
eval "$(basename "${BASH_SOURCE[0]}")(){ :; }"
|
||||
@ -151,7 +151,7 @@ upload_file(){
|
||||
# typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_audio or upload_audio for audio files, upload_document for general files, find_location for location
|
||||
send_action() {
|
||||
[ -z "$2" ] && return
|
||||
sendJson "${1}" '"action": "'"${2}"'"' "$ACTION_URL"
|
||||
sendJson "${1}" '"action": "'"${2}"'"' "$ACTION_URL" &
|
||||
}
|
||||
|
||||
send_location() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user