kill a few random image commands

This commit is contained in:
Dragon Fire
2024-03-20 19:05:07 -04:00
parent 3bc1fb0a92
commit 2cfafb83f8
6 changed files with 1 additions and 179 deletions
+1
View File
@@ -83,4 +83,5 @@ XIAO_GITHUB_REPO_NAME=
XIAO_GITHUB_REPO_USERNAME=
# Imgur album IDs
POTATO_ALBUM_ID=
XIAO_ALBUM_ID=
-34
View File
@@ -1,34 +0,0 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
const cheerio = require('cheerio');
module.exports = class FoodCommand extends Command {
constructor(client) {
super(client, {
name: 'food',
aliases: ['this-food-does-not-exist', 'this-snack-does-not-exist', 'ai-snack', 'ai-food', 'snack'],
group: 'random-img',
memberName: 'food',
description: 'Responds with a randomly generated food.',
credit: [
{
name: 'This Snack Does Not Exist',
url: 'https://thissnackdoesnotexist.com/',
reason: 'API'
}
]
});
}
async run(msg) {
try {
const { text } = await request.get('https://thissnackdoesnotexist.com/');
const $ = cheerio.load(text);
const img = $('div[class="Absolute-Center"]').first().attr('style').match(/background-image:url\((.+)\);/i);
const name = $('h1[class="snack-description"]').first().text();
return msg.say(name, img ? { files: [{ attachment: img[1], name: 'ai-food.jpg' }] } : {});
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-40
View File
@@ -1,40 +0,0 @@
const SubredditCommand = require('../../structures/commands/Subreddit');
const { list } = require('../../util/Util');
const subreddits = require('../../assets/json/hentai');
module.exports = class HentaiCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'hentai',
group: 'random-img',
memberName: 'hentai',
description: 'Responds with a random hentai image.',
details: `**Subreddits:** ${subreddits.join(', ')}`,
clientPermissions: ['EMBED_LINKS'],
nsfw: true,
postType: 'image',
getIcon: true,
credit: [
{
name: '0vertime-dev',
url: 'https://github.com/0vertime-dev',
reason: 'Original Subreddit List'
}
],
args: [
{
key: 'subreddit',
prompt: `What subreddit do you want to get hentai from? Either ${list(subreddits, 'or')}.`,
type: 'string',
oneOf: subreddits,
default: () => subreddits[Math.floor(Math.random() * subreddits.length)],
parse: subreddit => subreddit.toLowerCase()
}
]
});
}
generateText(post, subreddit, icon) {
return this.makeEmbed(post, subreddit, icon);
}
};
-32
View File
@@ -1,32 +0,0 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
module.exports = class KemonomimiCommand extends Command {
constructor(client) {
super(client, {
name: 'kemonomimi',
aliases: ['cat-girl', 'nekomusume', '猫娘', '獣耳'],
group: 'random-img',
memberName: 'kemonomimi',
description: 'Responds with a random kemonomimi image.',
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'noticeme.moe',
url: 'https://noticeme.moe/',
reason: 'API',
reasonURL: 'https://noticeme.moe/kemonomimi.php'
}
]
});
}
async run(msg) {
try {
const { body } = await request.get('https://noticeme.moe/kemonomimi.php');
return msg.say({ files: [body] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-41
View File
@@ -1,41 +0,0 @@
const SubredditCommand = require('../../structures/commands/Subreddit');
const { list } = require('../../util/Util');
const subreddits = require('../../assets/json/porn');
module.exports = class PornCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'porn',
aliases: ['pornography', 'porno'],
group: 'random-img',
memberName: 'porn',
description: 'Responds with a random porn image.',
details: `**Subreddits:** ${subreddits.join(', ')}`,
clientPermissions: ['EMBED_LINKS'],
nsfw: true,
postType: 'image',
getIcon: true,
credit: [
{
name: '0vertime-dev',
url: 'https://github.com/0vertime-dev',
reason: 'Original Subreddit List'
}
],
args: [
{
key: 'subreddit',
prompt: `What subreddit do you want to get porn from? Either ${list(subreddits, 'or')}.`,
type: 'string',
oneOf: subreddits,
default: () => subreddits[Math.floor(Math.random() * subreddits.length)],
parse: subreddit => subreddit.toLowerCase()
}
]
});
}
generateText(post, subreddit, icon) {
return this.makeEmbed(post, subreddit, icon);
}
};
-32
View File
@@ -1,32 +0,0 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
module.exports = class RedPandaCommand extends Command {
constructor(client) {
super(client, {
name: 'red-panda',
aliases: ['r-panda'],
group: 'random-img',
memberName: 'red-panda',
description: 'Responds with a random red panda image.',
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'redpanda.pics',
url: 'https://redpanda.pics/',
reason: 'API',
reasonURL: 'https://github.com/NexInfinite/redpandapics'
}
]
});
}
async run(msg) {
try {
const { body } = await request.get('https://redpanda.pics/random');
return msg.say({ files: [body.url] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};