Disambiguate bot and user tokens since bot token is only needed for rtm.start #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes (or at least works around) Itiviti#279
More context: https://api.slack.com/bot-users#bot_methods__methods-for-the-modern-bot
Slack has added new scopes that are not available to "classic" bots. However, simple-slack-api bots are required to be classic since it uses the rtm api (https://api.slack.com/rtm). My fix/workaround is to use the app's user token instead of bot token to use these scopes.
An alternative (better?) fix would be to replace rtm.start with modern calls to pull the necessary info when creating a session.