Skip to content

Latest commit

 

History

History
 
 

list

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Bashbot Example - List Commands

In this example, the configuration json file for Bashbot is parsed via jq to display the trigger and name of each command in the file.

Bashbot Configuration

This command is triggered by sending bashbot list 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": "List Available Bashbot Commands",
  "description": "List all of the possible commands stored in bashbot",
  "envvars": ["BASHBOT_CONFIG_FILEPATH"],
  "dependencies": ["jq"],
  "help": "bashbot list",
  "trigger": "list",
  "location": "./",
  "command": ["jq -r '.tools[] | .trigger' ${BASHBOT_CONFIG_FILEPATH}"],
  "parameters": [],
  "log": false,
  "ephemeral": false,
  "response": "code",
  "permissions": ["all"]
}