AI Cat, AI Vase, AI Horse

This commit is contained in:
Dragon Fire
2020-06-17 20:46:42 -04:00
parent 187a0828fc
commit bce1798457
6 changed files with 95 additions and 3 deletions
+27
View File
@@ -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' }] });
}
};
+27
View File
@@ -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' }] });
}
};
+29
View File
@@ -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`]
});
}
};
+1 -1
View File
@@ -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.',