BotsTextMessage
public class BotsTextMessage : BotsMessage
The class that represents a skill’s text message.
-
The list of all actions in the skill’s text message.
Declaration
Swift
public var actions: [BotsAction]? -
The list of all global actions in the skill’s text message.
Declaration
Swift
public var globalActions: [BotsAction]? -
The date and timestamp of skill’s text message.
Declaration
Swift
public private(set) var date: Date { get } -
The text associated with the skill’s text message.
Declaration
Swift
public private(set) var text: String? { get } -
The header text associated with the text message.
Declaration
Swift
public internal(set) var headerText: String? { get } -
The footer text associated with the text message.
Declaration
Swift
public private(set) var footerText: String? { get } -
True if the message is read, else false.
Declaration
Swift
public var isRead: Bool -
The type of message “BOT”, “USER”, “USERATTACHMENT”. In this case, it is initialized to “BOT”.
Declaration
Swift
public var messageType: String -
The payload json object for the text message.
Declaration
Swift
public private(set) var payload: [String : Any]? { get } -
The source of the text message. Either MessageType.bot or MessageType.agent. The default value is MessageType.bot
Declaration
Swift
public private(set) var messageSource: MessageType { get } -
ChannelExtensions , if received inside the payload json object. Can be used to identify special messages like Feedback message from the skill.
Declaration
Swift
public internal(set) var channelExtensions: [String : AnyObject]? { get } -
The constructor for initializing a BotsTextMessage object.
Declaration
Swift
public init(payload: [String : AnyObject], source: String = "BOT")Parameters
payloadThe message payload as a json object.
BotsTextMessage Class Reference