Constructor
new RandomMessageResponder(options)
Create a bot random message responder.
- Source:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object
|
The responder options.
|
Example
new Bot.Responder.RandomMessage({
messages: [
'Hello World!',
'Goodbye World!'
]
});
Extends
Methods
(static) create() → {RandomMessageResponder}
Create a bot random message responder (see RandomMessageResponder for parameters).
- Source:
(async) respond(message) → {Promise}
Respond to an incoming message with a random 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.