From bce1798457fd53e732a9e7405f35062612e11e1a Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Wed, 17 Jun 2020 20:46:42 -0400 Subject: [PATCH] AI Cat, AI Vase, AI Horse --- README.md | 11 ++++++++++- commands/random-img/ai-cat.js | 27 +++++++++++++++++++++++++++ commands/random-img/ai-horse.js | 27 +++++++++++++++++++++++++++ commands/random-img/ai-vase.js | 29 +++++++++++++++++++++++++++++ commands/random-img/cat.js | 2 +- package.json | 2 +- 6 files changed, 95 insertions(+), 3 deletions(-) create mode 100644 commands/random-img/ai-cat.js create mode 100644 commands/random-img/ai-horse.js create mode 100644 commands/random-img/ai-vase.js diff --git a/README.md b/README.md index 6083822e..b622f1d3 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ in the appropriate channel's topic to use it. ## Commands -Total: 491 +Total: 494 ### Utility: @@ -325,9 +325,12 @@ Total: 491 ### Random Image: * **ai-artwork:** Responds with randomly generated artwork. +* **ai-cat:** Responds with a randomly generated cat. * **ai-food:** Responds with a randomly generated food. * **ai-fursona:** Responds with a randomly generated fursona. +* **ai-horse:** Responds with a randomly generated horse. * **ai-person:** Responds with a randomly generated person. +* **ai-vase:** Responds with a randomly generated vase. * **ai-waifu:** Responds with a randomly generated waifu. * **awwnime:** Responds with cute random anime art. * **bird:** Responds with a random image of a bird. @@ -1477,12 +1480,18 @@ here. * the-onion ([RSS Feed](https://www.theonion.com/rss)) - [This Artwork Does Not Exist](https://thisartworkdoesnotexist.com/) * ai-artwork (API) +- [This Cat Does Not Exist](https://thiscatdoesnotexist.com/) + * ai-cat (API) - [This Fursona Does Not Exist](https://thisfursonadoesnotexist.com/) * ai-fursona (API) +- [This Horse Does Not Exist](https://thishorsedoesnotexist.com/) + * ai-horse (API) - [This Person Does Not Exist](https://thispersondoesnotexist.com/) * ai-person (API) - [This Snack Does Not Exist](https://thissnackdoesnotexist.com/) * ai-food (API) +- [This Vessel Does Not Exist](https://thisvesseldoesnotexist.com/#/) + * ai-vase (API) - [This Waifu Does Not Exist](https://www.thiswaifudoesnotexist.net/) * ai-waifu (API) - [Tim's Printables](https://www.timvandevall.com/) diff --git a/commands/random-img/ai-cat.js b/commands/random-img/ai-cat.js new file mode 100644 index 00000000..eed06844 --- /dev/null +++ b/commands/random-img/ai-cat.js @@ -0,0 +1,27 @@ +const Command = require('../../structures/Command'); +const request = require('node-superfetch'); + +module.exports = class AiCatCommand extends Command { + constructor(client) { + super(client, { + name: 'ai-cat', + aliases: ['this-cat-does-not-exist', 'ai-neko', 'ai-kitty', 'ai-meow'], + group: 'random-img', + memberName: 'ai-cat', + description: 'Responds with a randomly generated cat.', + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'This Cat Does Not Exist', + url: 'https://thiscatdoesnotexist.com/', + reason: 'API' + } + ] + }); + } + + async run(msg) { + const { body } = await request.get('https://thiscatdoesnotexist.com/'); + return msg.say('AI-Generated Cat', { files: [{ attachment: body, name: 'ai-cat.jpg' }] }); + } +}; diff --git a/commands/random-img/ai-horse.js b/commands/random-img/ai-horse.js new file mode 100644 index 00000000..ba8982f7 --- /dev/null +++ b/commands/random-img/ai-horse.js @@ -0,0 +1,27 @@ +const Command = require('../../structures/Command'); +const request = require('node-superfetch'); + +module.exports = class AiHorseCommand extends Command { + constructor(client) { + super(client, { + name: 'ai-horse', + aliases: ['this-horse-does-not-exist', 'horse'], + group: 'random-img', + memberName: 'ai-horse', + description: 'Responds with a randomly generated horse.', + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'This Horse Does Not Exist', + url: 'https://thishorsedoesnotexist.com/', + reason: 'API' + } + ] + }); + } + + async run(msg) { + const { body } = await request.get('https://thishorsedoesnotexist.com/'); + return msg.say('AI-Generated Horse', { files: [{ attachment: body, name: 'ai-horse.jpg' }] }); + } +}; diff --git a/commands/random-img/ai-vase.js b/commands/random-img/ai-vase.js new file mode 100644 index 00000000..3e6d0390 --- /dev/null +++ b/commands/random-img/ai-vase.js @@ -0,0 +1,29 @@ +const Command = require('../../structures/Command'); + +module.exports = class AiVaseCommand extends Command { + constructor(client) { + super(client, { + name: 'ai-vase', + aliases: ['this-vase-does-not-exist', 'vessel', 'this-vessel-does-not-exist'], + group: 'random-img', + memberName: 'ai-vase', + description: 'Responds with a randomly generated vase.', + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'This Vessel Does Not Exist', + url: 'https://thisvesseldoesnotexist.com/#/', + reason: 'API' + } + ] + }); + } + + run(msg) { + const num = Math.floor(Math.random() * 20000) + 1; + const padded = num.toString().padStart(7, '0'); + return msg.say(`AI-Generated Vase #${num}`, { + files: [`http://thisvesseldoesnotexist.s3-website-us-west-2.amazonaws.com/public/v2/fakes/${padded}.jpg`] + }); + } +}; diff --git a/commands/random-img/cat.js b/commands/random-img/cat.js index e7bf2617..5adc3ca0 100644 --- a/commands/random-img/cat.js +++ b/commands/random-img/cat.js @@ -5,7 +5,7 @@ module.exports = class CatCommand extends Command { constructor(client) { super(client, { name: 'cat', - aliases: ['neko', 'kitty'], + aliases: ['neko', 'kitty', 'meow'], group: 'random-img', memberName: 'cat', description: 'Responds with a random cat image.', diff --git a/package.json b/package.json index a313d78a..0efc6668 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "116.31.0", + "version": "116.32.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {