Friday the 13th Command

This commit is contained in:
Dragon Fire
2019-12-13 20:25:22 -05:00
parent 60ca2756da
commit 9511c527b3
3 changed files with 22 additions and 2 deletions
+2 -1
View File
@@ -55,7 +55,7 @@ Xiao is a Discord bot coded in JavaScript with
* [Rando Cardrissian](https://github.com/dragonfire535/rando-cardrissian) is a Cards Against Humanity bot, whose features were originally built into Xiao.
## Commands (347)
## Commands (348)
### Utility:
* **eval:** Executes JavaScript code.
@@ -174,6 +174,7 @@ Xiao is a Discord bot coded in JavaScript with
* **calendar:** Responds with today's holidays.
* **days-until:** Responds with how many days there are until a certain date.
* **doomsday-clock:** Responds with the current time of the Doomsday Clock.
* **friday-the-13th:** Determines if today is Friday the 13th.
* **google-doodle:** Responds with a Google Doodle, either the latest one or a random one from the past.
* **horoscope:** Responds with today's horoscope for a specific Zodiac sign.
* **humble-bundle:** Responds with the current Humble Bundle.
+19
View File
@@ -0,0 +1,19 @@
const Command = require('../../structures/Command');
module.exports = class FridayThe13thCommand extends Command {
constructor(client) {
super(client, {
name: 'friday-the-13th',
aliases: ['friday-13th', 'friday-13', 'friday-the-13', 'friday-the-thirteenth', 'friday-thirteenth'],
group: 'events',
memberName: 'friday-the-13th',
description: 'Determines if today is Friday the 13th.'
});
}
run(msg) {
const today = new Date();
const isFridaythe13th = today.getDay() === 5 && today.getDate() === 13;
return msg.say(`Today **is${isFridaythe13th ? '' : ' not'}** Friday the 13th.`);
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "109.2.3",
"version": "109.3.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {