Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Update core documentation #11

Merged
merged 2 commits into from
Oct 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,21 @@ controller.on('message_received', function(bot, message) {
});
```

### Middleware Error Events

| Event | Description
|-- |--
| receive_error | An error happend while processing the message in a recieve middleware.

Here is an example of a handler for an error event:

```javascript
controller.on('receive_error', function(err, bot, message) {
bot.reply(message, `There was an error processing your request.
Please try again later. Error: ${err.toString()}`);
});
```

### Conversation Lifecycle Events

| Event | Description
Expand Down