Constructor
new MessageResponder(options)
Create a bot message responder.
- Source:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The responder options.
|
Examples
new Bot.Responder.Message({
message: 'Hello World!'
});
new Bot.Responder.Message({
alias: 'ExampleAlias',
message: {
text: 'Just wanted to say:',
attachments: [
{ text: 'Hello World!' }
]
}
});
Extends
Methods
(static) create() → {MessageResponder}
Create a bot message responder (see MessageResponder for parameters).
- Source:
(async) respond(message) → {Promise}
Respond to an incoming message with the responder message.
- Overrides:
- Source:
Parameters:
Name | Type | Description |
---|---|---|
message |
Object
|
The Slack message to respond to. |
Returns:
- Type:
-
Promise
A promise which resolves when the message is sent.