Renamed alert to weather

This commit is contained in:
Logan Cusano
2023-02-24 20:21:12 -05:00
parent 893221424f
commit fb9fda1b07

View File

@@ -1,8 +1,9 @@
var libFlayer = require("../libFlayer.js"); var libCore = require("../libCore.js");
module.exports = { module.exports = {
name: 'alert', name: 'alert',
description: 'Alert', description: 'Get any current weather alerts in the state specified.',
example: "alert [state]",
async execute(message, args) { async execute(message, args) {
try { try {
if (args.length < 1) { if (args.length < 1) {
@@ -11,7 +12,7 @@ module.exports = {
} }
var question = encodeURIComponent(args.join(" ")); var question = encodeURIComponent(args.join(" "));
var answerData = await libFlayer.weatherAlert(question); var answerData = await libCore.weatherAlert(question);
answerData.forEach(feature => { answerData.forEach(feature => {
message.reply(` message.reply(`
${feature.properties.areaDesc} ${feature.properties.areaDesc}