Socket icon

Slack Socket Mode

Recieve events from Slack's Events API over a WebSocket connection. Deno port of @slack/socket-mode

build status language code size issues license version

View on deno.land




Usage

import "https://deno.land/x/dotenv@v2.0.0/load.ts"
import { SocketModeClient } from "https://deno.land/x/slack_socket_mode@1.0.1/mod.ts"

const appToken = Deno.env.get("SLACK_APP_TOKEN")
const socketModeClient = new SocketModeClient({ appToken })

// Attach listeners to events by type. See: https://api.slack.com/events/message
socketModeClient.addEventListener("message", ({ detail: { body, ack } }) => {
    ack()
    console.log(body)
})

await socketModeClient.start()

API

Supporters

Stargazers repo roster for @KhushrajRathod/slack-socket-mode

Forkers repo roster for @KhushrajRathod/slack-socket-mode