trying out time

This commit is contained in:
John Facey
2022-07-13 13:30:23 -05:00
parent 89ab911ccd
commit f1fbb217a4

34
commands/time.js Normal file
View File

@@ -0,0 +1,34 @@
var libFlayer = require("../libFlayer.js");
module.exports = {
name: 'time',
description: 'Time',
async execute(message, args) {
try {
if (args.length < 1) {
message.reply(`Select a time from the list`);
return;
}
return; //////////////////////////////////
var question = encodeURIComponent(args.join(" "));
var answerData = await libFlayer.worldTime(question);
answerData.forEach(feature => {
message.reply(`
${feature.properties.areaDesc}
${feature.properties.headline}
${feature.properties.description}
`);
})
} catch (err) {
message.reply(err.toString());
}
}
};