Socket
Book a DemoInstallSign in
Socket

@slack/bolt

Package Overview
Dependencies
Maintainers
10
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slack/bolt

A framework for building Slack apps, fast.

4.4.0
latest
Source
npmnpm
Version published
Weekly downloads
508K
-10.9%
Maintainers
10
Weekly downloads
 
Created

What is @slack/bolt?

@slack/bolt is a framework for building Slack apps using JavaScript. It simplifies the process of creating Slack apps by providing a set of tools and abstractions to handle common tasks such as event handling, command processing, and interactive components.

What are @slack/bolt's main functionalities?

Event Handling

This feature allows you to handle various Slack events such as messages, reactions, and more. The code sample demonstrates how to respond to a message event by sending a greeting.

const { App } = require('@slack/bolt');

const app = new App({
  token: 'xoxb-your-token',
  signingSecret: 'your-signing-secret'
});

app.event('message', async ({ event, say }) => {
  await say(`Hello, <@${event.user}>!`);
});

(async () => {
  await app.start(3000);
  console.log('⚡️ Bolt app is running!');
})();

Slash Commands

This feature allows you to create and handle custom slash commands in Slack. The code sample shows how to respond to a custom slash command `/hello` by sending a greeting.

const { App } = require('@slack/bolt');

const app = new App({
  token: 'xoxb-your-token',
  signingSecret: 'your-signing-secret'
});

app.command('/hello', async ({ command, ack, say }) => {
  await ack();
  await say(`Hello, <@${command.user_id}>!`);
});

(async () => {
  await app.start(3000);
  console.log('⚡️ Bolt app is running!');
})();

Interactive Components

This feature allows you to handle interactions with Slack's interactive components like buttons, select menus, and more. The code sample demonstrates how to respond to a button click interaction.

const { App } = require('@slack/bolt');

const app = new App({
  token: 'xoxb-your-token',
  signingSecret: 'your-signing-secret'
});

app.action('button_click', async ({ body, ack, say }) => {
  await ack();
  await say(`<@${body.user.id}> clicked the button!`);
});

(async () => {
  await app.start(3000);
  console.log('⚡️ Bolt app is running!');
})();

Other packages similar to @slack/bolt

Keywords

slack

FAQs

Package last updated on 20 May 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.