Skip to content

Function

The thing that runs when a button is tapped. A function takes some parameters and turns them into a shell command.

There are two kinds:

  • Built-in functions ship with the program (command, script). You do not create them.
  • Custom functions are extra functions you define as YAML files in function_directory.

When you tap a button, the bot looks up the function, fills in the values from the button, and runs the result in the shell.

A button using the built-in command function

Uptime button
- name: Uptime
  type: button
  function: command
  command: "uptime"

Configuration

For function_directory and button fields that reference functions, see Configuration.

  • Parameter — named values a function needs
  • Functions — built-in and custom functions in depth
  • Menu — how buttons reference functions