Add viu
This commit is contained in:
parent
9af7ec2623
commit
3ac6d76297
@ -3,5 +3,22 @@
|
||||
command="$1"
|
||||
shift
|
||||
args="$@"
|
||||
curl -s --location --request POST 'https://api.ignuranza.net/remote-command-api/command' --header 'Content-Type: application/json' --header 'User-Agent: RcAPI/1.2' --data-raw "{\"botName\": \"AstralNetworkHonusBot\", \"botPassword\": \"KixdujXD37898ZSy893\", \"command\": \"${command}\", \"replyToUserId\": 0, \"senderUserId\": 1237252783, \"chatId\": 1237252783, \"queryText\": \"$args\", \"rawSingleArgument\": false}" | jq -r ".imageUrl" | xargs --max-args=1 --no-run-if-empty curl -s --location | display -title "HonusBot CLI" -quiet
|
||||
display_command="| display -title \"HonusBot CLI\" -quiet"
|
||||
download_url_to_stdin=true
|
||||
|
||||
if [ -x "$(command -v feh)" ]; then
|
||||
display_command="| feh"
|
||||
download_url_to_stdin=false
|
||||
fi
|
||||
|
||||
if [ -x "$(command -v viu)" ]; then
|
||||
display_command="> /tmp/temp-honus.bin; viu /tmp/temp-honus.bin"
|
||||
download_url_to_stdin=true
|
||||
fi
|
||||
|
||||
if [ download_url_to_stdin = true ]; then
|
||||
display_command="xargs --max-args=1 --no-run-if-empty curl -s --location ${display_command}"
|
||||
fi
|
||||
|
||||
curl -s --location --request POST 'https://api.ignuranza.net/remote-command-api/command' --header 'Content-Type: application/json' --header 'User-Agent: RcAPI/1.2' --data-raw "{\"botName\": \"AstralNetworkHonusBot\", \"botPassword\": \"KixdujXD37898ZSy893\", \"command\": \"${command}\", \"replyToUserId\": 0, \"senderUserId\": 1237252783, \"chatId\": 1237252783, \"queryText\": \"$args\", \"rawSingleArgument\": false}" | jq -r ".imageUrl" | ${display_command}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user