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

Change Bolt to Bolt for JavaScript #425

Merged
merged 2 commits into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Slack ⚡️ Bolt
# Slack ⚡️ Bolt for JavaScript

[![Build Status](https://travis-ci.org/slackapi/bolt.svg?branch=master)](https://travis-ci.org/slackapi/bolt)
[![codecov](https://codecov.io/gh/slackapi/bolt/branch/master/graph/badge.svg)](https://codecov.io/gh/slackapi/bolt)

A framework to build Slack apps, _fast_.
A JavaScript framework to build Slack apps _in a flash_.

## Initialization

Expand Down Expand Up @@ -153,7 +153,7 @@ Depending on the type of incoming event a listener is meant for, `ack()` should
to to update the message with a simple message, or an `object` to replace it with a complex message. Replacing the
message to remove the interactive elements is a best practice for any action that should only be performed once.

If an app does not call `ack()` within the time limit, Bolt will generate an error. See [handling
If an app does not call `ack()` within the time limit, Bolt for JavaScript will generate an error. See [handling
errors](#handling-errors) for more details.

The following is an example of acknowledging a dialog submission:
Expand Down Expand Up @@ -300,7 +300,7 @@ app.message(noBotMessages, ({ message }) => console.log(
));
```

Message subtype matching is common, so Bolt ships with a builtin listener middleware that filters all messages that
Message subtype matching is common, so Bolt for JavaScript ships with a builtin listener middleware that filters all messages that
match a given subtype. The following is an example of the opposite of the one above - the listener only sees messages
that _are_ `bot_message`s.

Expand Down
2 changes: 1 addition & 1 deletion docs/_advanced/conversation_store.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ order: 3
---

<div class="section-content">
Bolt includes support for a store, which sets and retrieves state related to a conversation. Conversation stores have two methods:
Bolt for JavaScript includes support for a store, which sets and retrieves state related to a conversation. Conversation stores have two methods:
* `set()` modifies conversation state. `set()` requires a `conversationId` of type string, `value` of any type, and an optional `expiresAt` of type number. `set()` returns a `Promise`.
* `get()` fetches conversation state from the store. `get()` requires a `conversationId` of type string and returns a Promise with the conversation’s state.

Expand Down
2 changes: 1 addition & 1 deletion docs/_advanced/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ order: 7
---

<div class="section-content">
By default, Bolt will log information from your app to the console. You can customize how much logging occurs by passing a `logLevel` in the constructor. The available log levels in order of most to least logs are `DEBUG`, `INFO`, `WARN`, and `ERROR`.
By default, Bolt for JavaScript will log information from your app to the console. You can customize how much logging occurs by passing a `logLevel` in the constructor. The available log levels in order of most to least logs are `DEBUG`, `INFO`, `WARN`, and `ERROR`.
</div>

```javascript
Expand Down
10 changes: 5 additions & 5 deletions docs/_advanced/receiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ order: 8
---

<div class="section-content">
A receiver is responsible for handling and parsing any incoming events from Slack, then emitting the event so the Bolt app can add context and pass it to your app’s listeners. Receivers must conform to the Receiver interface:
A receiver is responsible for handling and parsing any incoming events from Slack, then emitting the event so the Bolt for JavaScript app can add context and pass it to your app’s listeners. Receivers must conform to the Receiver interface:

| Method | Parameters | Return type |
|--------------|----------------------------------|-------------|
| `on()` | `type: string`, `listener: fn()` | `unknown` |
| `start()` | None | `Promise` |
| `stop()` | None | `Promise` |

`on()` is called two times in the Bolt app:
* `Receiver.on('message', listener)` should route all incoming requests that have been parsed to `onIncomingEvent()`. It’s called in the Bolt app as `this.receiver.on('message', message => this.onIncomingEvent(message))`.
* `Receiver.on('error', listener)` should route errors to the global error handler. It’s called in the Bolt app as `this.receiver.on('error', error => this.onGlobalError(error))`.
`on()` is called two times in a Bolt for JavaScript app:
* `Receiver.on('message', listener)` should route all incoming requests that have been parsed to `onIncomingEvent()`. It’s called in the Bolt for JavaScript app as `this.receiver.on('message', message => this.onIncomingEvent(message))`.
* `Receiver.on('error', listener)` should route errors to the global error handler. It’s called in the Bolt for JavaScript app as `this.receiver.on('error', error => this.onGlobalError(error))`.

To use a custom receiver, you can pass it into the constructor when initializing your Bolt app. Here is what a basic custom receiver might look like.
To use a custom receiver, you can pass it into the constructor when initializing your Bolt for JavaScript app. Here is what a basic custom receiver might look like.

For a more in-depth look at a receiver, [read the source code for the built-in Express receiver](https://github.com/slackapi/bolt/blob/master/src/ExpressReceiver.ts)
</div>
Expand Down
10 changes: 5 additions & 5 deletions docs/_tutorials/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ permalink: /tutorial/getting-started
redirect_from:
- /getting-started
---
# Getting started with Bolt
# Getting started with Bolt for JavaScript

<div class="section-content">
This guide is meant to walk you through getting up and running with a Slack app using Bolt. Along the way, we’ll create a new Slack app, set up your local environment, and develop an app that listens and responds to messages from a Slack workspace.
This guide is meant to walk you through getting up and running with a Slack app using Bolt for JavaScript. Along the way, we’ll create a new Slack app, set up your local environment, and develop an app that listens and responds to messages from a Slack workspace.
</div>

---
Expand Down Expand Up @@ -63,7 +63,7 @@ npm init

You’ll be prompted with a series of questions to describe your new project (you can accept the defaults by hitting <kbd>Enter</kbd> on each prompt if you aren’t picky). After you’re done, you’ll have a new `package.json` file in your directory.

Before we install the Bolt package to your new project, let's save the bot token and signing secret that was generated when you configured your app. These should be stored as environment variables and should *not* be saved in version control.
Before we install the Bolt for JavaScript package to your new project, let's save the bot token and signing secret that was generated when you configured your app. These should be stored as environment variables and should *not* be saved in version control.

1. **Copy your Signing Secret from the Basic Information page** and then store it in a new environment variable. The following example works on Linux and MacOS; but [similar commands are available on Windows](https://superuser.com/questions/212150/how-to-set-env-variable-in-windows-cmd-line/212153#212153).

Expand Down Expand Up @@ -303,9 +303,9 @@ You can see that we used the `action_id` to add a listener for our button action
---

### Next steps
You just built your first Bolt app! 🎉
You just built your first Bolt for JavaScript app! 🎉

Now that you have a basic app up and running, you can start exploring the parts of Bolt that will make your app stand out. Here are some ideas about where to look next:
Now that you have a basic app up and running, you can start exploring how to make your Bolt app stand out. Here are some ideas about what to explore next:

* Read through the [Basic concepts](https://slack.dev/bolt#basic) to learn about the different methods and features your Bolt app has access to.

Expand Down
Loading