Uses the Yahoo weather API via HTTPS to return the weather of a specified location/city to your Slack chat, using the RTM API.
You first need this bot running on your Slack chat: https://github.com/xBytez/slackbotapi/
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
Require the module in your bot script:
var slackweatherbot = require('slackweatherbot');
weatherBot = new slackweatherbot();
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;
The module should work as per the screenshot above.