Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

super-slack

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

super-slack

A tool for creating Slack Bots with Node

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Super Slack

A tool for creating Slack bots with Node.js.

var Slack = require('super-slack');

var slackBot = new Slack.Bot('http://slack/webhook', {
    username: 'Elon Musk Bot',
    emoji: ':rocket:',
    channel: '#general' // Default channel
});

var quotes = [
    "When something is important enough, you do it even if the odds are not in your favor.",
    "Failure is an option here. If things are not failing, you are not innovating enough.",
    "Any product that needs a manual to work is broken."
];

slackBot.send(quotes[Math.floor(Math.random() * quotes.length)])
.then(console.log)
.fail(console.error);

Bot(webhook, options)

  • webhook (string) Incoming Webhook provided by Slack.
  • options (object)
    • username: Name of the bot
    • [emoji]: Emoji icon to use as the bot's avatar
    • [icon_url]: URL of custom avatar icon
    • [channel]: Default channel to post to
Bot.send(message)
  • message (Object|string): The message to send to the Slack channel.
    • text: Text of message to send.
    • channel: Channel to send the message to.
Bot.respond(request)

Keywords

FAQs

Package last updated on 05 Feb 2016

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc