Skip to content

Latest commit

 

History

History
 
 

help

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Bashbot Example - Help Dialog

In this example, the configuration json file for Bashbot is parsed via jq to display the help and description values for each command

Bashbot Configuration

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"
  ]
}