Skip to main content
Slash commands are triggered when a user types /command in the message composer. The event provides access to the channel where the command was invoked, allowing you to post responses using standard SDK methods.

Properties

required
The adapter that received this event
Channel<TState>
required
Type: ChannelThe channel where the command was invoked
string
required
The slash command name (e.g., “/help”)
unknown
required
Platform-specific raw payload
string
required
Arguments text after the command (e.g., “topic search” from “/help topic search”)
string
Trigger ID for opening modals (time-limited, typically ~3 seconds)
required
The user who invoked the command

Methods

openModal()

Open a modal/dialog form in response to this slash command.

Parameters

The modal element to display (JSX or ModalElement)

Returns

Promise<{ viewId: string } | undefined> The view/dialog ID, or undefined if modals are not supported