mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 06:42:50 +02:00
Fix
This commit is contained in:
@@ -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}**
|
||||||
|
|||||||
Reference in New Issue
Block a user