From 0aa469d0f3899213a0bfb63a654309e771779cc2 Mon Sep 17 00:00:00 2001 From: JLKwong <61807745+JLKwong@users.noreply.github.com> Date: Mon, 15 Mar 2021 12:38:32 -0700 Subject: [PATCH] `treehouses message slack apitoken` new formatting (fixes #2090) (#2094) Co-authored-by: dogi --- modules/message.sh | 26 +++++++++++++++++++++----- package.json | 2 +- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/modules/message.sh b/modules/message.sh index daf09e130..b76f51b5c 100644 --- a/modules/message.sh +++ b/modules/message.sh @@ -275,12 +275,28 @@ function message { elif check_apitoken slack; then get_apitoken slack else - echo "To get an authorized access token" + echo "To get an authorized access token:" echo "" - echo "Navigate to https://api.slack.com/apps and create an APP. Provide a name for the APP and select the \"Development Slack Workspace (eg : Open Learning Exchange)\" from the drop down list" - echo "Go to \"OAuth & Permission\" under \"features \" and select the scope under \"User Token Scopes\" and add \"chat:write\", \"channels:write\", \"channel:read\", \"channel:history\", \"groups:write\", \"group:read\", \"mpim:write\", \"im:write\", \"usergroups.read\" and \"users.read\" for the APP from the drop down list" - echo "Then install APP to the workspace and click the allow button to give permissions in the redirected link and then you will get the \"OAuth access token\"" - echo "Run $BASENAME message slack apitoken " + echo "1. Go to https://api.slack.com/apps" + echo "2. Click \"Create New App\"" + echo "3. Type a name in \"App Name\"" + echo "4. Select the \"Development Slack Workspace\" (eg : Open Learning Exchange)\ from the drop-down" + echo "5. Click \"OAuth & Permission\" under \"features \"" + echo "6. Under \"User Token Scopes\", click \"Add an OAuth Scope\"" + echo "7. Add the following permissions:" + echo " \"chat:write\"" + echo " \"channels:write\"" + echo " \"channels:read\"" + echo " \"channels:history\"" + echo " \"groups:write\"" + echo " \"groups:read\"" + echo " \"im:write\"" + echo " \"mpim:write\"" + echo " \"usergroups:read\"" + echo " \"users:read\"" + echo "8. Under \"OAuth Tokens & Redirect URLs\", click \"Install to Workspace\"" + echo "9. Click \"Allow\". This will give permissions and display the User OAuth Token" + echo "10. Run $BASENAME message slack apitoken " fi ;; channels) diff --git a/package.json b/package.json index df1edcc2e..215cc003f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.25.26", + "version": "1.25.27", "remote": "4000", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh",