Use the MessageContext class to work with messages.
MessageContext Class
Contains information about messages.
MessageContext Methods
MessageContext has the following methods.
getTs()
Gets the timestamp of the message.
Signature
public String getTs()
Return Value
Type: String
getUserId()
Gets the ID of the user who initiated the shortcut.
Signature
public String getUserId()
Return Value
Type: String
getText()
The text of the message.
Signature
public string getText()
Return Value
Type: String