From 9511c527b37000d73f238ab8d7f5a7b087cdc464 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 13 Dec 2019 20:25:22 -0500 Subject: [PATCH] Friday the 13th Command --- README.md | 3 ++- commands/events/friday-the-13th.js | 19 +++++++++++++++++++ package.json | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 commands/events/friday-the-13th.js diff --git a/README.md b/README.md index 66b781b6..c881452f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/commands/events/friday-the-13th.js b/commands/events/friday-the-13th.js new file mode 100644 index 00000000..881d4ef7 --- /dev/null +++ b/commands/events/friday-the-13th.js @@ -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.`); + } +}; diff --git a/package.json b/package.json index ba5e4bdb..8df52046 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "109.2.3", + "version": "109.3.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {