-
Notifications
You must be signed in to change notification settings - Fork 656
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
Modernize examples in documentation #702
Conversation
Codecov Report
@@ Coverage Diff @@
## master #702 +/- ##
=======================================
Coverage 91.97% 91.97%
=======================================
Files 7 7
Lines 486 486
Branches 91 91
=======================================
Hits 447 447
Misses 22 22
Partials 17 17 Continue to review full report at Codecov.
|
docs/_pages/getting_started.md
Outdated
the scope(s) with the least amount of privilege for your app's needs. In this guide we will use the | ||
Web API to post a message. The scope required for this is called `chat:write:user`. Use the dropdown or start typing its name to select and add the scope, then click "Save Changes". | ||
Navigate to "OAuth & Permissions" and scroll down to the section for scopes. Slack describes the various permissions | ||
your app could obtain from a user as **scopes**. There are a [ton of scopes](https://api.slack.com/scopes)! Some are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace "tons of scopes" with "over 60 scopes"
docs/_pages/rtm_client.md
Outdated
rtm.on(`message::channel_name`, (event) => { | ||
// For structure of `event`, see https://api.slack.com/events/message/channel_name | ||
console.log(`A channel was renamed from ${message.old_name} to ${message.name}`); | ||
}); | ||
``` | ||
|
||
If you rename a channel in which the bot is a member, you should see the log message. | ||
With this program running, when you rename a channel in which the bot is a member, you should see the log message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence is confusing. Maybe "When the program is running and you rename a channel your bot is a member of, you should see the logged message."
examples/README.md
Outdated
@@ -1,12 +1,13 @@ | |||
## Examples | |||
|
|||
This directory contains small example programs that you can copy to get started quickly. Try these examples out for | |||
yourself by cloning (or downloading) this repository, running `npm install` in this directory, and running one of the | |||
scripts (e.g. `node basic-web-client.js`). We recommend using the latest LTS version node. | |||
yourself by cloning (or downloading) this repository, running `npm install` in this directory. Then run one of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Try these examples out for yourself by cloning (or downloading) this repository and running npm install
in this directory"
thanks for the thorough review. these comments are spot on! |
Summary
The goal is to update all our examples to syntax that is modern. This also cleans up language used, particularly around workspace apps. Also took the opportunity to remove old tests that were no longer being used.
Requirements (place an
x
in each[ ]
)