From 564faba0268025111c5579c76f8f035ba7f6b221 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 29 Jun 2020 14:12:57 -0400 Subject: [PATCH] Cuteness Command --- README.md | 4 ++- assets/json/cuteness.json | 14 +++++++++++ commands/random-seed/coolness.js | 1 + commands/random-seed/cuteness.js | 42 ++++++++++++++++++++++++++++++++ package.json | 2 +- 5 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 assets/json/cuteness.json create mode 100644 commands/random-seed/cuteness.js diff --git a/README.md b/README.md index cc72c4ff..a474e436 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 505 +Total: 506 ### Utility: @@ -358,6 +358,7 @@ Total: 505 * **butt:** Determines a user's butt quality. * **coolness:** Determines a user's coolness. +* **cuteness:** Determines a user's cuteness. * **dick:** Determines your dick size. * **friendship:** Determines how good friends two users are. * **guess-looks:** Guesses what a user looks like. @@ -886,6 +887,7 @@ here. - [AZLyrics](https://www.azlyrics.com/) * lyrics (Lyrics Data) - [AzuraApple](https://github.com/AzuraApple) + * cuteness (Concept) * screenshot (Concept) * worth (Concept) - [Bethesda](https://bethesda.net/en/dashboard) diff --git a/assets/json/cuteness.json b/assets/json/cuteness.json new file mode 100644 index 00000000..64f3a6ad --- /dev/null +++ b/assets/json/cuteness.json @@ -0,0 +1,14 @@ +[ + "the most adorable being to walk this Earth.", + "extremely cute.", + "kawaiiiii.", + "cuter than cute.", + "kinda cute.", + "okay, nothing special.", + "🤮.", + "ugly, honestly.", + "just absolutely gross.", + "an absolute train wreck.", + "... MY EYES!", + "the most disgusting person I've ever had the displeasure of seeing." +] diff --git a/commands/random-seed/coolness.js b/commands/random-seed/coolness.js index f12291fa..393a20ae 100644 --- a/commands/random-seed/coolness.js +++ b/commands/random-seed/coolness.js @@ -6,6 +6,7 @@ module.exports = class CoolnessCommand extends Command { constructor(client) { super(client, { name: 'coolness', + aliases: ['cool'], group: 'random-seed', memberName: 'coolness', description: 'Determines a user\'s coolness.', diff --git a/commands/random-seed/cuteness.js b/commands/random-seed/cuteness.js new file mode 100644 index 00000000..f538a611 --- /dev/null +++ b/commands/random-seed/cuteness.js @@ -0,0 +1,42 @@ +const Command = require('../../structures/Command'); +const { MersenneTwister19937, integer } = require('random-js'); +const texts = require('../../assets/json/cuteness'); + +module.exports = class CutenessCommand extends Command { + constructor(client) { + super(client, { + name: 'cuteness', + aliases: ['cute'], + group: 'random-seed', + memberName: 'cuteness', + description: 'Determines a user\'s cuteness.', + args: [ + { + key: 'user', + prompt: 'Which user do you want to determine the cuteness of?', + type: 'user', + default: msg => msg.author + } + ], + credit: [ + { + name: 'AzuraApple', + url: 'https://github.com/AzuraApple', + reason: 'Concept' + } + ] + }); + } + + run(msg, { user }) { + const authorUser = user.id === msg.author.id; + if (user.id === this.client.user.id) return msg.reply('Me? I think I\'m by far the cutest girl ever!'); + if (this.client.isOwner(user)) { + if (authorUser) return msg.reply('You\'re the most adorable little cutie I know! ❤'); + return msg.reply(`${user.username} is ugly. Like, not cute at all.`); + } + const random = MersenneTwister19937.seed(user.id); + const cuteness = integer(0, texts.length - 1)(random); + return msg.reply(`${authorUser ? 'You are' : `${user.username} is`} ${texts[cuteness]}`); + } +}; diff --git a/package.json b/package.json index 1dac145e..2e1f23f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "117.1.0", + "version": "117.2.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {