This commit is contained in:
Daniel Odendahl Jr
2017-11-09 00:02:59 +00:00
parent 819db49057
commit b6afded306
125 changed files with 743 additions and 289 deletions
+4 -4
View File
@@ -10,11 +10,11 @@ module.exports = class WeatherCommand extends Command {
aliases: ['open-weather-map'],
group: 'search',
memberName: 'weather',
description: 'Responds with weather information for a specified location.',
description: 'Responds with weather information for a specific location.',
clientPermissions: ['EMBED_LINKS'],
args: [
{
key: 'query',
key: 'location',
prompt: 'What location would you like to get the weather of?',
type: 'string'
}
@@ -22,12 +22,12 @@ module.exports = class WeatherCommand extends Command {
});
}
async run(msg, { query }) {
async run(msg, { location }) {
try {
const { body } = await snekfetch
.get('http://api.openweathermap.org/data/2.5/weather')
.query({
q: query,
q: location,
units: 'metric',
appid: OWM_KEY
});