CommandsOption
type CommandsOption = { enabled: boolean; onSearch?: (query: string) => Promise<Command[]>; onSelect?: (command: Command) => Promise<void | CommandSelection>;};Properties
Section titled “Properties”enabled
Section titled “enabled”enabled: boolean;Enables the ”/” command menu, including applicable built-in composer actions.
onSearch()?
Section titled “onSearch()?”optional onSearch: (query: string) => Promise<Command[]>;Returns integration-defined commands matching the input query.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<Command[]>
onSelect()?
Section titled “onSelect()?”optional onSelect: (command: Command) => Promise< | void| CommandSelection>;Runs a command. Return an entity to insert it, another menu to continue command selection, or nothing when the command only performs an effect.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”Promise<
| void
| CommandSelection>