Add bash file

This commit is contained in:
HonusBot 2021-05-15 19:49:22 +02:00
parent 4a69bbbfc6
commit 670da379af
2 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,14 @@ HonusBot CLI
`honusbot-cli.sh pony`
## Requirements
*Usually on Ubuntu these packages are already installed*
- `curl`
- `jq`
- `imagemagick`
## Usage
Available commands:

7
honusbot-cli.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash -e
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" -monitor -density 50 -quiet