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

slackweatherbot

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slackweatherbot

Search by location, bot gives you the weather

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

slackweatherbot

Slack Weather Bot

Uses the Yahoo weather API via HTTPS to return the weather of a specified location/city to your Slack chat, using the RTM API.

Screenshot

Step 1

You first need this bot running on your Slack chat: https://github.com/xBytez/slackbotapi/

Step 2

Once you have your bot running off your script similar to example_bot.js on the xBytez repo, install the slackweatherbot via npm: (sudo) npm install slackweatherbot

Step 3

Require the module in your bot script:

var slackweatherbot = require('slackweatherbot');
weatherBot = new slackweatherbot();
Step 4

Within the switch statement place the following code:

case "weather":
    var location = command[1];
    weatherBot.getWeather(location, function (err, message) {
        if (message) slack.sendMsg(data.channel, message);
    });
    break;
Step 5

The module should work as per the screenshot above.

Keywords

FAQs

Package last updated on 03 Nov 2015

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