Description
This event is generated when a user enters a slash command.
// Assuming the command was: // /remind me in 30 minutes to have dinner { "name": "client.slashCommand", "userId": "u:cfc76545-3400-4864-892a-513a9f4ae409", "userName": "Alyssa P. Hacker", "chat": "u:1e6429de-16b7-48b3-acc0-c2d7ec5ad195", "chatName": "Ben Bitdiddle", "command": "remind", "text": "me in 30 minutes to have dinner" }
Event Attributes
Attribute Name | Attribute Type | Attribute Description |
---|---|---|
userId | String | User identifier |
userName | String | Name of the user |
chat | String | Id of user or group in whose chat tab the command was entered |
chatName | String | Name of the user or group whose chat tab is open |
command | String | The name of the command |
text | String | Additional text entered by the user |
Response
Your app can respond with a text
value – this should be a short (upto 100 chars) string that is displayed to the user who entered the slash command.
{ "text": "<toaster message>" }