mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 20:22:39 +01:00
Merge branch 'master' of github.com:reality/dbot
This commit is contained in:
commit
cafe173911
@ -20,7 +20,7 @@ var weather = function(dbot) {
|
|||||||
'json': true
|
'json': true
|
||||||
}, function(err, response, body) {
|
}, function(err, response, body) {
|
||||||
if(!err && body && _.has(body, 'cod') && body.cod === 200) {
|
if(!err && body && _.has(body, 'cod') && body.cod === 200) {
|
||||||
event.reply('['+body.name+', '+body.sys.country+']' + ' Condition: ' + body.weather[0].description + ' | Temp: ' + Math.round(body.main.temp) + 'C/'+Math.round(body.main.temp* 9 / 5 + 32)+'F | Humidity: ' + body.main.humidity + '% | Wind Speed: ' + body.wind.speed + 'KM/H');
|
event.reply('['+(body.name ? body.name +', ':'')+body.sys.country+']' + ' Condition: ' + body.weather[0].description + ' | Temp: ' + Math.round(body.main.temp) + 'C/'+Math.round(body.main.temp* 9 / 5 + 32)+'F | Humidity: ' + body.main.humidity + '% | Wind Speed: ' + body.wind.speed + 'KM/H');
|
||||||
} else {
|
} else {
|
||||||
event.reply('There is no weather in ' + city);
|
event.reply('There is no weather in ' + city);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user