Gathering detailed insights and metrics for slack-node
Gathering detailed insights and metrics for slack-node
npm install slack-node
Typescript
Module System
Node Version
NPM Version
94.9
Supply Chain
91.9
Quality
74.3
Maintenance
50
Vulnerability
97.6
License
CoffeeScript (89.79%)
JavaScript (8.8%)
Makefile (1.41%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
65,315,227
Last Day
2,749
Last Week
72,188
Last Month
276,020
Last Year
3,777,443
MIT License
167 Stars
87 Commits
32 Forks
8 Watchers
3 Branches
13 Contributors
Updated on Oct 23, 2021
Latest Version
0.1.8
Package Id
slack-node@0.1.8
Size
8.12 kB
NPM Version
2.15.10
Node Version
6.5.0
Published on
Sep 07, 2016
Cumulative downloads
Total Downloads
Last Day
4.3%
2,749
Compared to previous day
Last Week
7.1%
72,188
Compared to previous week
Last Month
23.6%
276,020
Compared to previous month
Last Year
-39.8%
3,777,443
Compared to previous year
1
4
Slack Node SDK, full support for Webhook and the Slack API, continuously updated.
npm install slack-node
At first, you have to apply Slack webhook.
and copy webhook url
Code example:
1var Slack = require('slack-node'); 2 3webhookUri = "__uri___"; 4 5slack = new Slack(); 6slack.setWebhook(webhookUri); 7 8slack.webhook({ 9 channel: "#general", 10 username: "webhookbot", 11 text: "This is posted to #general and comes from a bot named webhookbot." 12}, function(err, response) { 13 console.log(response); 14});
Use icon emoji, you can give a Slack defined emoji, or use image from URL.
1var Slack = require('slack-node'); 2 3webhookUri = "__uri___"; 4 5slack = new Slack(); 6slack.setWebhook(webhookUri); 7 8// slack emoji 9slack.webhook({ 10 channel: "#general", 11 username: "webhookbot", 12 icon_emoji: ":ghost:", 13 text: "test message, test message" 14}, function(err, response) { 15 console.log(response); 16}); 17 18// URL image 19slack.webhook({ 20 channel: "#general", 21 username: "webhookbot", 22 icon_emoji: "http://icons.iconarchive.com/icons/rokey/popo-emotions/128/after-boom-icon.png", 23 text: "test message, test message" 24}, function(err, response) { 25 console.log(response); 26});
Otherwise, you can check usage from example
First you have to apply an API from SLACK API page,
The method, please reference Slack API page
example code,
1var Slack = require('slack-node'); 2apiToken = "-- api token --"; 3 4slack = new Slack(apiToken); 5 6slack.api("users.list", function(err, response) { 7 console.log(response); 8}); 9 10slack.api('chat.postMessage', { 11 text:'hello from nodejs', 12 channel:'#general' 13}, function(err, response){ 14 console.log(response); 15});
0.1.8
POST data sent as an array in a form will be sent correctly
0.1.7
slack-node no longer crashes if Slack returns HTML instead of JSON.
0.1.6
support ES6, promise function.
0.1.3
use requestretry replace request. thanks for timjrobinson
update test
fixed emoji error
fixed return error crash when run time.
0.1.0
fixed test type error
support new slack webhook.
0.0.95
fixed webhook function and test
support file upload function
0.0.93
return header and status
0.0.92
merge slack emoji for webhook
pass request full request object
0.0.9
pass parameters bug fixed
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/30 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More