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 NameAttribute TypeAttribute Description
userIdStringUser identifier
userNameStringName of the user
chatStringId of user or group in whose chat tab the command was entered
chatNameStringName of the user or group whose chat tab is open
commandStringThe name of the command
textStringAdditional 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>"
}