Skip to main content

Type Alias: OptionsHandler()

type OptionsHandler: (payload) => any | Promise<any> | undefined;

A handler function for menu options requests.

Parameters

payload: any

an object describing the state of the menu

Returns

any | Promise<any> | undefined

an options list or option groups list. When the menu is within an interactive message, (within: 'interactive_message') the option keys are text and value. When the menu is within a dialog (within: 'dialog') the option keys are label and value. When the menu is within a dialog (within: 'block_actions') the option keys are a text block and value. This function may also return a Promise either of these values. If a Promise is returned and it does not complete within 3 seconds, Slack will display an error to the user. If there is no return value, then the user is shown an empty list of options.

Defined in

adapter.ts:835