From 41f721c95472118cee5255aa1af3a7a15f4e2d69 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 8 Sep 2018 22:51:48 -0400 Subject: [PATCH] Chinese Zodiac Command --- README.md | 3 ++- assets/json/chinese-zodiac.json | 14 ++++++++++++++ commands/analyze/chinese-zodiac.js | 26 ++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 assets/json/chinese-zodiac.json create mode 100644 commands/analyze/chinese-zodiac.js diff --git a/README.md b/README.md index 9581bb7d..14060a1e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Xiao is a Discord bot coded in JavaScript with The bot is no longer available for invite. You can self-host the bot, or use her on the [home server](https://discord.gg/sbMe32W). -## Commands (304) +## Commands (305) ### Utility: * **eval:** Executes JavaScript code. @@ -178,6 +178,7 @@ on the [home server](https://discord.gg/sbMe32W). ### Analyzers: * **butt:** Determines a user's butt quality. +* **chinese-zodiac:** Responds with the Chinese Zodiac Sign for the given year. * **coolness:** Determines a user's coolness. * **dick:** Determines your dick size. * **gender-analyze:** Determines the gender of a name. diff --git a/assets/json/chinese-zodiac.json b/assets/json/chinese-zodiac.json new file mode 100644 index 00000000..f7084f9a --- /dev/null +++ b/assets/json/chinese-zodiac.json @@ -0,0 +1,14 @@ +[ + "Monkey", + "Rooster", + "Dog", + "Pig", + "Rat", + "Ox", + "Tiger", + "Rabbit", + "Dragon", + "Snake", + "Horse", + "Goat" +] diff --git a/commands/analyze/chinese-zodiac.js b/commands/analyze/chinese-zodiac.js new file mode 100644 index 00000000..a60a5014 --- /dev/null +++ b/commands/analyze/chinese-zodiac.js @@ -0,0 +1,26 @@ +const Command = require('../../structures/Command'); +const signs = require('../../assets/json/chinese-zodiac'); + +module.exports = class ChineseZodiacCommand extends Command { + constructor(client) { + super(client, { + name: 'chinese-zodiac', + aliases: ['chinese-zodiac-sign'], + group: 'analyze', + memberName: 'chinese-zodiac', + description: 'Responds with the Chinese Zodiac Sign for the given year.', + args: [ + { + key: 'year', + prompt: 'What year would you like to get the Chinese Zodiac Sign for?', + type: 'integer', + min: 1 + } + ] + }); + } + + run(msg, { year }) { + return msg.say(`The Chinese Zodiac Sign for ${year} is ${signs[year % signs.length]}.`); + } +}; diff --git a/package.json b/package.json index b0f0796b..8ce1a307 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "90.6.0", + "version": "90.7.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {