mirror of
https://github.com/reality/dbot.git
synced 2024-12-24 19:52:36 +01:00
complete module
This commit is contained in:
parent
be80b185ed
commit
f4a118db89
@ -11,7 +11,7 @@ var rain = function(dbot) {
|
||||
var apikey = dbot.config.rain.apikey;
|
||||
var place = event.input[1];
|
||||
if (!place) { var place = "Aberystwyth"; }
|
||||
var url = "http://api.wunderground.com/api/" + apikey + "/conditions/q/CA/" + place + ".json";
|
||||
var url = "http://api.wunderground.com/api/" + apikey + "/conditions/q/" + place + ".json";
|
||||
request(url, function(error, response, body) {
|
||||
if(response.statusCode == "200") {
|
||||
var data = JSON.parse(body);
|
||||
@ -27,7 +27,7 @@ var rain = function(dbot) {
|
||||
} else {
|
||||
var score = "e";
|
||||
}
|
||||
event.reply(dbot.t("rain-"+score));
|
||||
event.reply(dbot.t("rain-"+score,{"place": place}));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"rain-0": {
|
||||
"english" : "It's not raining."
|
||||
"english" : "It's not raining in {place}."
|
||||
},
|
||||
"rain-1": {
|
||||
"english" : "It's raining."
|
||||
"english" : "It's raining in {place}."
|
||||
},
|
||||
"rain-2": {
|
||||
"english" : "It's raining rather a lot."
|
||||
"english" : "It's raining rather a lot in {place}."
|
||||
},
|
||||
"rain-3": {
|
||||
"english" : "It's raining shitloads."
|
||||
@ -15,7 +15,7 @@
|
||||
"english" : "It's raining fucktons."
|
||||
},
|
||||
"rain-5": {
|
||||
"english" : "It's raining whales (in Wales)!"
|
||||
"english" : "It's raining whales (in {place})!"
|
||||
},
|
||||
"rain-6": {
|
||||
"english" : "IT'S SO FUCKING WET OUT HERE MAN"
|
||||
|
Loading…
Reference in New Issue
Block a user