
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@hubot-friends/hubot-slack
Advanced tools
The original hubot-slack is no longer under active development. Slack recommends taking a look at Bolt for JS with Socket Mode first if you're getting started.
But I'm going to maintain this fork as I continue to evolve Hubot. So feel free to use this one.
npm i @hubot-friends/hubot-slack hubot
This is a Hubot adapter to use with Slack.
Comprehensive documentation is available.
connections:write
scope. This will be the HUBOT_SLACK_APP_TOKEN
environment variable. The adapter will use this token to authenticate via Slacks Socket Mode (WebSockets)HUBOT_SLACK_BOT_TOKEN
environment variable. The adapter will use this token to POST messages to Slack's HTTP API.An example command to start the app on MacOS is the following. Assuming there is a file called .env
with the following environment variables set:
HUBOT_SLACK_APP_TOKEN=xapp-1-...
HUBOT_SLACK_BOT_TOKEN=xoxb-...
Set the environment variables to the values you created for your Slack Apps App-Level Token (HUBOT_SLACK_APP_TOKEN
) and Bot Token (HUBOT_SLACK_BOT_TOKEN
).
env $(cat .env | grep -v \"#\" | xargs -0) PORT=8080 hubot -a @hubot-friends/hubot-slack -n mybot
Another way to start the app in MacOS or Linux is:
HUBOT_SLACK_APP_TOKEN=xapp-1... HUBOT_SLACK_BOT_TOKEN=xoxb-... PORT=8080 hubot -a @hubot-friends/hubot-slack -n mybot
Need the following permissions:
Need to following events:
Then you'll have to install the Bot to your workspace. It's under the "OAuth Tokens" section on the same page. That's the Bot Token you'll need.
The following YAML manifest will work.
display_information:
name: NameOfYourBot
description: Description of your bot.
background_color: "#3d001d"
features:
app_home:
home_tab_enabled: false
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: NameOfYourbot
always_online: true
oauth_config:
scopes:
bot:
- app_mentions:read
- channels:join
- channels:history
- channels:read
- chat:write
- im:write
- im:history
- im:read
- users:read
- groups:history
- groups:write
- groups:read
- mpim:history
- mpim:write
- mpim:read
settings:
event_subscriptions:
bot_events:
- app_mention
- message.channels
- message.im
- message.groups
- message.mpim
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: true
token_rotation_enabled: false
FAQs
A new Slack adapter for Hubot
The npm package @hubot-friends/hubot-slack receives a total of 265 weekly downloads. As such, @hubot-friends/hubot-slack popularity was classified as not popular.
We found that @hubot-friends/hubot-slack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.