In this example, the configuration json file for Bashbot is parsed via jq to display the help and description values for each command
This command is triggered by sending bashbot help
in a slack channel where Bashbot is also a member. There is no external script for this command, takes no arugments/parameters, and expects jq to already be installed, and the environment variable BASHBOT_CONFIG_FILEPATH
to be pointing at the running configuration, on the host machine.
{
"name": "BashBot Help",
"description": "Show this message",
"envvars": ["BASHBOT_CONFIG_FILEPATH"],
"dependencies": ["jq"],
"help": "bashbot help",
"trigger": "help",
"location": "./",
"command": ["jq -r '.tools[] | \"\\(.help) - \\(.description)\"' ${BASHBOT_CONFIG_FILEPATH}"],
"parameters": [],
"log": false,
"ephemeral": false,
"response": "code",
"permissions": [
"all"
]
}