This commit is contained in:
Dragon Fire
2024-04-04 17:17:07 -04:00
parent 70d7fc4fbf
commit d77df69768
+3 -4
View File
@@ -25,12 +25,12 @@ module.exports = class FloridaManCommand extends Command {
{ {
key: 'month', key: 'month',
type: 'month', type: 'month',
default: '' default: new Date().getMonth() + 1
}, },
{ {
key: 'day', key: 'day',
type: 'integer', type: 'integer',
default: '', default: new Date().getDate(),
min: 1, min: 1,
max: 31 max: 31
} }
@@ -39,8 +39,7 @@ module.exports = class FloridaManCommand extends Command {
} }
async run(msg, { month, day }) { async run(msg, { month, day }) {
const today = new Date(); const article = await this.fetchArticle(month, day);
const article = await this.fetchArticle(month || today.getMonth() + 1, day || today.getDate());
if (!article) return msg.say('Could not find any results.'); if (!article) return msg.say('Could not find any results.');
return msg.say(stripIndents` return msg.say(stripIndents`
**${article.title}** **${article.title}**