Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f50f8cc

Browse files
authored
Merge pull request #6 from henrymei/spelling_fixes
Fix spelling and whitespace
2 parents d39970d + 72814f0 commit f50f8cc

File tree

9 files changed

+28
-28
lines changed

9 files changed

+28
-28
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ If you are running this project locally, you'll need to set up tunnels for Slack
6666
You'll likely want to test events coming to your server without going through the actions on your Slack team. [Postman](https://www.getpostman.com/) is a useful tool you can use to recreate requests sent from Slack to your server. This is especially helpful for events like user join, where the workflow to recreate the event requires quite a bit of set up.
6767

6868
## Let's get started :tada:
69-
* **[Section 1: ~~Steal~~ Build This Bot](docs/Section-1.md)** :point_left:
70-
* [Section 2: Create a Slack App and Bot User](docs/Section-2.md)
71-
* [Section 3: Subscribe to Events](docs/Section-3.md)
69+
* **[Section 1: ~~Steal~~ Build This Bot](docs/Section-1.md)** :point_left:
70+
* [Section 2: Create a Slack App and Bot User](docs/Section-2.md)
71+
* [Section 3: Subscribe to Events](docs/Section-3.md)
7272
* [Section 4: App Credentials](docs/Section-4.md)
7373
* [Section 5: Make it Go](docs/Section-5.md)
7474

@@ -77,8 +77,8 @@ You'll likely want to test events coming to your server without going through th
7777
### Documentation
7878

7979
##### Slack Documentation
80-
* [Getting started with Slack apps](https://api.slack.com/slack-apps)
81-
* [Slack Events API documentation](https://api.slack.com/events)
80+
* [Getting started with Slack apps](https://api.slack.com/slack-apps)
81+
* [Slack Events API documentation](https://api.slack.com/events)
8282
* [Slack Web API documentation](https://api.slack.com/web)
8383

8484
##### Documentation for Tools

app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _event_handler(event_type, slack_event):
2020
Parameters
2121
----------
2222
event_type : str
23-
type of event recieved from Slack
23+
type of event received from Slack
2424
slack_event : dict
2525
JSON response from a Slack reaction event
2626
@@ -131,7 +131,7 @@ def hears():
131131
make_response(message, 403, {"X-Slack-No-Retry": 1})
132132

133133
# ====== Process Incoming Events from Slack ======= #
134-
# If the incoming request is an Event we've subcribed to
134+
# If the incoming request is an Event we've subscribed to
135135
if "event" in slack_event:
136136
event_type = slack_event["event"]["type"]
137137
# Then handle the event by event_type and have your bot respond

bot.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
# To remember which teams have authorized your app and what tokens are
1111
# associated with each team, we can store this information in memory on
1212
# as a global object. When your bot is out of development, it's best to
13-
# save this in a more persistant memory store.
13+
# save this in a more persistent memory store.
1414
authed_teams = {}
1515

1616

1717
class Bot(object):
18-
""" Instanciates a Bot object to handle Slack onboarding interactions."""
18+
""" Instantiates a Bot object to handle Slack onboarding interactions."""
1919
def __init__(self):
2020
super(Bot, self).__init__()
2121
self.name = "pythonboardingbot"
@@ -31,13 +31,13 @@ def __init__(self):
3131
self.verification = os.environ.get("VERIFICATION_TOKEN")
3232

3333
# NOTE: Python-slack requires a client connection to generate
34-
# an oauth token. We can connect to the client without authenticating
34+
# an OAuth token. We can connect to the client without authenticating
3535
# by passing an empty string as a token and then reinstantiating the
3636
# client with a valid OAuth token once we have one.
3737
self.client = SlackClient("")
3838
# We'll use this dictionary to store the state of each message object.
39-
# In a production envrionment you'll likely want to store this more
40-
# persistantly in a database.
39+
# In a production environment you'll likely want to store this more
40+
# persistently in a database.
4141
self.messages = {}
4242

4343
def auth(self, code):
@@ -115,7 +115,7 @@ def onboarding_message(self, team_id, user_id):
115115
# of for the team id we've got.
116116
if self.messages.get(team_id):
117117
# Then we'll update the message dictionary with a key for the
118-
# user id we've recieved and a value of a new message object
118+
# user id we've received and a value of a new message object
119119
self.messages[team_id].update({user_id: message.Message()})
120120
else:
121121
# If there aren't any message for that team, we'll add a dictionary
@@ -181,7 +181,7 @@ def update_emoji(self, team_id, user_id):
181181

182182
def update_pin(self, team_id, user_id):
183183
"""
184-
Update onboarding welcome message after recieving a "pin_added"
184+
Update onboarding welcome message after receiving a "pin_added"
185185
event from Slack. Update timestamp for welcome message.
186186
187187
Parameters

docs/Section-1.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This file handles all incoming requests from Slack. In this file, we'll import t
1010
First, you'll want to create a Flask app in [`app.py`](./../app.py).
1111
Then you'll need to add a couple routes:
1212
- **`"/install"`** a route that renders an installation page where users can add your Slack app to their team
13-
- **`"/thanks"`** a route that renders a thank you page to let users know your app has been sucessfully installed.
13+
- **`"/thanks"`** a route that renders a thank you page to let users know your app has been successfully installed.
1414
- This route will be the endpoint of the `redirect URL` where Slack will send a temporary authorization code. We'll exchange that code for an OAuth token here, using our `bot` object's `auth` method.
1515
- **`"/listening"`** a route that listens for all incoming requests from Slack.
1616
- This route will be the endpoint of the `request URL` where Slack will send all Events your app is subscribed to.
@@ -49,12 +49,12 @@ This file contains a python class for creating `message` objects. Creating `mess
4949
### Other Stuff
5050

5151
#### [Templates Folder](./../templates)
52-
You'll need some HTML for your [installation](./../templates/install.html) and [thank you](./../templates/thanks.html) pages. Once you create this folder, we'll use Jinja templates and add the [Add to Slack](https://api.slack.com/docs/slack-button) button to allow users to install our app. The [thank you page](./../templates/thanks.html) lets users know that the app has been sucessfully installed.
52+
You'll need some HTML for your [installation](./../templates/install.html) and [thank you](./../templates/thanks.html) pages. Once you create this folder, we'll use Jinja templates and add the [Add to Slack](https://api.slack.com/docs/slack-button) button to allow users to install our app. The [thank you page](./../templates/thanks.html) lets users know that the app has been successfully installed.
5353

5454
#### [welcome.json](./../welcome.json)
5555
This is a JSON file of message attachments used in the `message.py` file to create the onboarding welcome message our bot will send to new users.
5656

5757

5858
---
59-
**Next [Section 2: Create a Slack App and Bot User](./../docs/Section-2.md)**
60-
**Previous [README](./../README.md)**
59+
**Next [Section 2: Create a Slack App and Bot User](./../docs/Section-2.md)**
60+
**Previous [README](./../README.md)**

docs/Section-2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ Let's get ourselves a shiny new **Bot User** so our app can communicate on Slack
2525
![add_bot_user](https://cloud.githubusercontent.com/assets/4828352/20548602/c67f367a-b0d9-11e6-85eb-b2069120da1e.png)
2626

2727
---
28-
**Next [Section 3: Subscribe to Events](./../docs/Section-3.md)**
29-
**Previous [Section 1: ~~Steal~~ Build This Bot](./../docs/Section-1.md)**
28+
**Next [Section 3: Subscribe to Events](./../docs/Section-3.md)**
29+
**Previous [Section 1: ~~Steal~~ Build This Bot](./../docs/Section-1.md)**

docs/Section-3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ After you've subscribed to all the events your app will need, make sure to **Sav
2323
![save_changes](https://cloud.githubusercontent.com/assets/4828352/20575405/fca754dc-b16d-11e6-880d-5eb8dd5d5196.png)
2424

2525
---
26-
**Next [Section 4: App Credentials](./../docs/Section-4.md)**
27-
**Previous [Section 2: Create a Slack App and Bot User](./../docs/Section-2.md)**
26+
**Next [Section 4: App Credentials](./../docs/Section-4.md)**
27+
**Previous [Section 2: Create a Slack App and Bot User](./../docs/Section-2.md)**

docs/Section-4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ In `bot.py`, Line 24:
2929
Our app will grab these secrets from our environment.
3030

3131
---
32-
**Next [Section 5: Make it Go](./../docs/Section-5.md)**
33-
**Previous [Section 3: Subscribe to Events](./../docs/Section-3.md)**
32+
**Next [Section 5: Make it Go](./../docs/Section-5.md)**
33+
**Previous [Section 3: Subscribe to Events](./../docs/Section-3.md)**

docs/Section-5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ After you've enabled events, you'll need to add a **redirect URL** in your app's
3030

3131
![redirect_url_thanks](https://cloud.githubusercontent.com/assets/4828352/20549300/d5aa215e-b0df-11e6-9796-3cb6fb1da7b4.png)
3232

33-
Now your app is ready to be installed on a Slack team! :tada:
33+
Now your app is ready to be installed on a Slack team. Go ahead and hit that `https://<yourtempsubdomain>.ngrok.io/` URL to install! :tada:
3434

3535
---
36-
**Next [More Info: README](./../README.md)**
37-
**Previous [Section 4: App Credentials](./../docs/Section-4.md)**
36+
**Next [More Info: README](./../README.md)**
37+
**Previous [Section 4: App Credentials](./../docs/Section-4.md)**

message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Message(object):
1010
"""
11-
Instanciates a Message object to create and manage
11+
Instantiates a Message object to create and manage
1212
Slack onboarding messages.
1313
"""
1414
def __init__(self):

0 commit comments

Comments
 (0)