Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default handler for 1:1 messages #6

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Add default handler for 1:1 messages #6

merged 3 commits into from
Oct 11, 2023

Conversation

dwickr
Copy link
Collaborator

@dwickr dwickr commented Oct 11, 2023

Previously, the bot framework only processed messages which were
slash-commands. However, in 1:1 channels you can interact with the bots
just by sending messages without slash commands.

Calling the setDefaultHandler method with the handler function as its
only argument tells the bot to send all non-command messages to this
handler. E.g.

this.setDefaultHandler(fn)

Previously, the bot framework only processed messages which were
slash-commands. However, in 1:1 channels you can interact with the bots
just by sending messages without slash commands.

Calling the `setDefaultHandler` method with the handler function as its
only argument tells the bot to send all non-command messages to this
handler. E.g.

```
this.setDefaultHandler(fn)
```
@dwickr dwickr merged commit 5f57cfc into master Oct 11, 2023
3 checks passed
@dwickr dwickr deleted the default-handler branch October 11, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant