Skip to content

Commit e95065b

Browse files
PR feedback
1 parent 46b4c83 commit e95065b

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

docs/content/building-an-app.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ There are three main token types available to a Slack app: user (`xoxp`), bot (`
4040

4141
We're going to use bot and app-level tokens for this guide.
4242

43-
1. Navigate to the **OAuth & Permissions** on the left sidebar and scroll down to the **Bot Token Scopes** section. Click **Add an OAuth Scope**.
43+
1. Navigate to **OAuth & Permissions** on the left sidebar and scroll down to the **Bot Token Scopes** section. Click **Add an OAuth Scope**.
4444

4545
2. For now, we'll just add one scope: [`chat:write`](https://docs.slack.dev/reference/scopes/chat.write). This grants your app the permission to post messages in channels it's a member of.
4646

@@ -363,7 +363,7 @@ if __name__ == "__main__":
363363

364364
The value inside of `say()` is now an object that contains an array of `blocks`. Blocks are the building components of a Slack message and can range from text to images to datepickers. In this case, your app will respond with a section block that includes a button as an accessory. Since we're using `blocks`, the `text` is a fallback for notifications and accessibility.
365365

366-
You'll notice in the button `accessory` object, there is an `action_id`. This will act as a unique identifier for the button so your app can specify what action it wants to respond to.
366+
You'll notice in the button `accessory` object, there is an `action_id`. This will act as a unique identifier for the button so your app can specify which action it wants to respond to.
367367

368368
:::tip[Using Block Kit Builder]
369369

@@ -373,7 +373,7 @@ The [Block Kit Builder](https://app.slack.com/block-kit-builder) is an simple wa
373373

374374
Now, if you restart your app and say "hello" in a channel your app is in, you'll see a message with a button. But if you click the button, nothing happens (_yet!_).
375375

376-
Let's add a handler to send a followup message when someone clicks the button:
376+
Let's add a handler to send a follow-up message when someone clicks the button:
377377

378378
<Tabs groupId="socket-or-http">
379379
<TabItem value="socket-mode" label="Socket Mode">

docs/content/getting-started.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This quickstart guide aims to help you get a Slack app using Bolt for Python up
1010
import Tabs from '@theme/Tabs';
1111
import TabItem from '@theme/TabItem';
1212

13-
When complete, you'll have a local environment configured with a customized [app](https://github.com/slackapi/bolt-python/tree/main/examples/getting_started) running to modify and make your own.
13+
When complete, you'll have a local environment configured with a customized [app](https://github.com/slack-samples/bolt-python-getting-started-app) running to modify and make your own.
1414

1515
:::tip[Reference for readers]
1616

@@ -20,7 +20,9 @@ In search of the complete guide to building an app from scratch? Check out the [
2020

2121
#### Prerequisites
2222

23-
A few tools are needed for the following steps. We recommend using the [**Slack CLI**](https://tools.slack.dev/slack-cli/) for the smoothest experience, but other options remain available.
23+
A few tools are needed for the following steps. We recommend using the [**Slack CLI**](https://tools.slack.dev/slack-cli/) for the smoothest experience, but other options remain available.
24+
25+
You can also begin by installing git and downloading the latest stable version of Python. Refer to [Python's setup and building guide](https://devguide.python.org/getting-started/setup-building/) for more details.
2426

2527
Install the latest version of the Slack CLI to get started:
2628

@@ -63,7 +65,7 @@ $ slack create first-bolt-app --template slack-samples/bolt-python-getting-start
6365
$ cd first-bolt-app
6466
```
6567

66-
After a project is created you'll have a `package.json` file for app dependencies and a `.slack` directory for Slack CLI configuration.
68+
After a project is created you'll have a `requirements.txt` file for app dependencies and a `.slack` directory for Slack CLI configuration.
6769

6870
A few other files exist too, but we'll visit these later.
6971

@@ -193,9 +195,17 @@ The defaults included leave opportunities abound, so to personalize this app let
193195

194196
Chat is a common thing apps do and responding to various types of messages can make conversations more interesting.
195197

196-
Using an editor of choice, open the app.py file and add the following message listener after the "hello" handler:
198+
Using an editor of choice, open the `app.py` file and add the following import to the top of the file, and message listener after the "hello" handler:
199+
200+
```python
201+
import random
197202

198-
// SAMPLE CODE HERE
203+
@app.message("goodbye")
204+
def message_goodbye(say):
205+
responses = ["Adios", "Au revoir", "Farewell"]
206+
parting = random.choice(responses)
207+
say(f"{parting}!")
208+
```
199209

200210
Once the file is updated, save the changes and then we'll make sure those changes are being used.
201211

0 commit comments

Comments
 (0)