Remove more commands

This commit is contained in:
Dragon Fire
2024-03-21 21:01:13 -04:00
parent 706ba4c179
commit a72bb293fe
19 changed files with 0 additions and 741 deletions
-33
View File
@@ -1,33 +0,0 @@
const Command = require('../../framework/Command');
const { shuffle } = require('../../util/Util');
const waldos = require('../../assets/json/waldo');
module.exports = class WaldoCommand extends Command {
constructor(client) {
super(client, {
name: 'waldo',
aliases: ['wheres-waldo', 'where\'s-waldo', 'wally', 'wheres-wally', 'where\'s-wally'],
group: 'games-sp',
memberName: 'waldo',
description: 'Try to find Waldo with spoiler tags!',
credit: [
{
name: 'u/guschuma',
url: 'https://www.reddit.com/user/guschuma/',
reason: 'Concept',
reasonURL: 'https://www.reddit.com/r/copypasta/comments/gkk7z1/wheres_waldo_game_created_by_me/'
},
{
name: 'Martin Handford',
url: 'https://www.candlewick.com/authill.asp?b=Author&m=bio&id=1497&pix=y',
reason: 'Original "Where\'s Wally?" Book Series'
}
]
});
}
run(msg) {
const where = shuffle(waldos);
return msg.say(where.map(waldo => `||${waldo}||`).join(' '));
}
};
-21
View File
@@ -1,21 +0,0 @@
const SubredditCommand = require('../../structures/commands/Subreddit');
module.exports = class AwwnimeCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'awwnime',
aliases: ['aww-anime', 'moe'],
group: 'random-img',
memberName: 'awwnime',
description: 'Responds with cute random anime art.',
clientPermissions: ['EMBED_LINKS'],
postType: 'image',
getIcon: true,
subreddit: 'awwnime'
});
}
generateText(post, subreddit, icon) {
return this.makeEmbed(post, subreddit, icon);
}
};
-33
View File
@@ -1,33 +0,0 @@
const SubredditCommand = require('../../structures/commands/Subreddit');
const { list } = require('../../util/Util');
const subreddits = ['interestingasfuck', 'mildlyinteresting', 'damnthatsinteresting'];
module.exports = class InterestingCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'interesting',
aliases: ['interesting-as-fuck', 'mildly-interesting'],
group: 'random-img',
memberName: 'interesting',
description: 'Responds with a random interesting image.',
details: `**Subreddits:** ${subreddits.join(', ')}`,
clientPermissions: ['EMBED_LINKS'],
postType: 'image',
getIcon: true,
args: [
{
key: 'subreddit',
prompt: `What subreddit do you want to get memes 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 SubredditCommand = require('../../structures/commands/Subreddit');
const { list } = require('../../util/Util');
const subreddits = require('../../assets/json/meme');
module.exports = class MemeCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'meme',
group: 'random-img',
memberName: 'meme',
description: 'Responds with a random meme.',
details: `**Subreddits:** ${subreddits.join(', ')}`,
clientPermissions: ['EMBED_LINKS'],
postType: 'image',
getIcon: true,
args: [
{
key: 'subreddit',
prompt: `What subreddit do you want to get memes 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);
}
};
-19
View File
@@ -1,19 +0,0 @@
const ImgurAlbumCommand = require('../../structures/commands/ImgurAlbum');
const { POTATO_ALBUM_ID } = process.env;
module.exports = class PotatoCommand extends ImgurAlbumCommand {
constructor(client) {
super(client, {
name: 'potato',
group: 'random-img',
memberName: 'potato',
description: 'Responds with a random potato image.',
clientPermissions: ['ATTACH_FILES'],
albumID: POTATO_ALBUM_ID
});
}
generateText() {
return 'I like potatoes.';
}
};
-30
View File
@@ -1,30 +0,0 @@
const SubredditCommand = require('../../structures/commands/Subreddit');
const { list } = require('../../util/Util');
const subreddits = require('../../assets/json/news');
module.exports = class NewsCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'news',
group: 'random-res',
memberName: 'news',
description: 'Responds with a random news article.',
details: `**Subreddits:** ${subreddits.join(', ')}`,
clientPermissions: ['EMBED_LINKS'],
getIcon: true,
args: [
{
key: 'subreddit',
prompt: `What subreddit do you want to get news from? Either ${list(subreddits, 'or')}.`,
type: 'string',
oneOf: subreddits,
parse: subreddit => subreddit.toLowerCase()
}
]
});
}
generateText(post, subreddit, icon) {
return this.makeEmbed(post, subreddit, icon);
}
};
-18
View File
@@ -1,18 +0,0 @@
const SubredditCommand = require('../../structures/commands/Subreddit');
module.exports = class ShowerThoughtCommand extends SubredditCommand {
constructor(client) {
super(client, {
name: 'shower-thought',
aliases: ['shower-thoughts', 'shower', 's-thought', 'shower-t'],
group: 'random-res',
memberName: 'shower-thought',
description: 'Responds with a random shower thought, directly from r/Showerthoughts.',
subreddit: 'Showerthoughts'
});
}
generateText(post) {
return post.title;
}
};
-27
View File
@@ -1,27 +0,0 @@
const SubredditCommandBase = require('../../structures/commands/Subreddit');
module.exports = class SubredditCommand extends SubredditCommandBase {
constructor(client) {
super(client, {
name: 'subreddit',
aliases: ['r/', 'sub'],
group: 'random-res',
memberName: 'subreddit',
description: 'Responds with a random post from a subreddit.',
clientPermissions: ['EMBED_LINKS'],
getIcon: true,
args: [
{
key: 'subreddit',
prompt: 'What subreddit would you like to get a post from?',
type: 'string',
parse: subreddit => encodeURIComponent(subreddit)
}
]
});
}
generateText(post, subreddit, icon) {
return this.makeEmbed(post, subreddit, icon);
}
};
-70
View File
@@ -1,70 +0,0 @@
const Command = require('../../framework/Command');
const { MessageEmbed } = require('discord.js');
const request = require('node-superfetch');
const { shorten, pickWhenMany } = require('../../util/Util');
const { TMDB_KEY } = process.env;
module.exports = class MovieCommand extends Command {
constructor(client) {
super(client, {
name: 'movie',
aliases: ['tmdb-movie', 'imdb'],
group: 'search',
memberName: 'movie',
description: 'Searches TMDB for your query, getting movie results.',
clientPermissions: ['EMBED_LINKS'],
credit: [
{
name: 'The Movie Database',
url: 'https://www.themoviedb.org/',
reason: 'API',
reasonURL: 'https://www.themoviedb.org/documentation/api'
}
],
args: [
{
key: 'query',
prompt: 'What movie would you like to search for?',
type: 'string'
}
]
});
}
async run(msg, { query }) {
try {
const search = await request
.get('http://api.themoviedb.org/3/search/movie')
.query({
api_key: TMDB_KEY,
include_adult: msg.channel.nsfw || false,
query
});
if (!search.body.results.length) return msg.say('Could not find any results.');
let find = search.body.results.find(m => m.title.toLowerCase() === query.toLowerCase())
|| search.body.results[0];
if (search.body.results.length > 1) {
const resultListFunc = (movie, i) => `**${i + 1}.** ${movie.title} (${movie.release_date || 'TBA'})`;
find = await pickWhenMany(msg, search.body.results, find, resultListFunc);
}
const { body } = await request
.get(`https://api.themoviedb.org/3/movie/${find.id}`)
.query({ api_key: TMDB_KEY });
const embed = new MessageEmbed()
.setColor(0x00D474)
.setTitle(body.title)
.setURL(`https://www.themoviedb.org/movie/${body.id}`)
.setAuthor('TMDB', 'https://i.imgur.com/3K3QMv9.png', 'https://www.themoviedb.org/')
.setDescription(body.overview ? shorten(body.overview) : 'No description available.')
.setThumbnail(body.poster_path ? `https://image.tmdb.org/t/p/w500${body.poster_path}` : null)
.addField(' Runtime', body.runtime ? `${body.runtime} mins.` : '???', true)
.addField(' Release Date', body.release_date || '???', true)
.addField(' Genres', body.genres.length ? body.genres.map(genre => genre.name).join(', ') : '???')
.addField(' Production Companies',
body.production_companies.length ? body.production_companies.map(c => c.name).join(', ') : '???');
return msg.embed(embed);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-58
View File
@@ -1,58 +0,0 @@
const Command = require('../../framework/Command');
const { MessageEmbed } = require('discord.js');
const request = require('node-superfetch');
const moment = require('moment');
const { formatNumber } = require('../../util/Util');
module.exports = class RedditCommand extends Command {
constructor(client) {
super(client, {
name: 'reddit',
aliases: ['u/'],
group: 'search',
memberName: 'reddit',
description: 'Responds with information on a Reddit user.',
clientPermissions: ['EMBED_LINKS'],
credit: [
{
name: 'Reddit',
url: 'https://www.reddit.com/',
reason: 'API',
reasonURL: 'https://www.reddit.com/dev/api/'
}
],
args: [
{
key: 'user',
prompt: 'What user would you like to get information on?',
type: 'string',
parse: user => encodeURIComponent(user)
}
]
});
}
async run(msg, { user }) {
try {
const { body } = await request.get(`https://www.reddit.com/user/${user}/about.json`);
const { data } = body;
if (data.hide_from_robots) return msg.say('This user is hidden from bots.');
const embed = new MessageEmbed()
.setColor(0xFF4500)
.setAuthor('Reddit', 'https://i.imgur.com/DSBOK0P.png', 'https://www.reddit.com/')
.setThumbnail(data.icon_img)
.setURL(`https://www.reddit.com/user/${user}`)
.setTitle(`/u/${data.name}`)
.addField(' Username', data.name, true)
.addField(' ID', data.id, true)
.addField(' Karma', formatNumber(data.link_karma + data.comment_karma), true)
.addField(' Creation Date', moment.utc(data.created_utc * 1000).format('MM/DD/YYYY h:mm A'), true)
.addField(' Gold?', data.is_gold ? 'Yes' : 'No', true)
.addField(' Verified?', data.verified ? 'Yes' : 'No', true);
return msg.embed(embed);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
-64
View File
@@ -1,64 +0,0 @@
const Command = require('../../framework/Command');
const request = require('node-superfetch');
const { MessageEmbed } = require('discord.js');
const { shorten } = require('../../util/Util');
const { UNSPLASH_KEY } = process.env;
module.exports = class StockPhotoCommand extends Command {
constructor(client) {
super(client, {
name: 'stock-photo',
aliases: ['unsplash', 'stock-image', 'stock-img'],
group: 'search',
memberName: 'stock-photo',
description: 'Searches for stock photos based on your query.',
clientPermissions: ['EMBED_LINKS'],
credit: [
{
name: 'Unsplash',
url: 'https://unsplash.com/',
reason: 'API',
reasonURL: 'https://unsplash.com/developers'
}
],
args: [
{
key: 'query',
prompt: 'What image would you like to search for?',
type: 'string'
}
]
});
}
async run(msg, { query }) {
try {
const { body } = await request
.get('https://api.unsplash.com/photos/random')
.set({ Authorization: `Client-ID ${UNSPLASH_KEY}` })
.query({
query,
content_filter: msg.channel.nsfw ? 'low' : 'high'
});
await this.triggerDownload(body);
const embed = new MessageEmbed()
.setTitle(body.description ? shorten(body.description, 256) : 'Unnamed Image')
.setURL(body.user.links.html)
.setColor(body.color)
.setAuthor(body.user.name || body.user.username, undefined, body.user.links.html)
.setImage(body.urls.raw)
.setFooter(`Photo by ${body.user.name || body.user.username} on Unsplash`)
.setTimestamp(new Date(body.updated_at));
return msg.embed(embed);
} catch (err) {
if (err.status === 404) return msg.say('Could not find any results.');
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
triggerDownload(body) {
return request
.get(body.links.download_location)
.set({ Authorization: `Client-ID ${UNSPLASH_KEY}` });
}
};
-72
View File
@@ -1,72 +0,0 @@
const Command = require('../../framework/Command');
const { MessageEmbed } = require('discord.js');
const request = require('node-superfetch');
const { shorten, formatNumber, pickWhenMany } = require('../../util/Util');
const { TMDB_KEY } = process.env;
module.exports = class TvShowCommand extends Command {
constructor(client) {
super(client, {
name: 'tv-show',
aliases: ['tmdb-tv-show', 'tv', 'tmdb-tv'],
group: 'search',
memberName: 'tv-show',
description: 'Searches TMDB for your query, getting TV show results.',
clientPermissions: ['EMBED_LINKS'],
credit: [
{
name: 'The Movie Database',
url: 'https://www.themoviedb.org/',
reason: 'API',
reasonURL: 'https://www.themoviedb.org/documentation/api'
}
],
args: [
{
key: 'query',
prompt: 'What TV show would you like to search for?',
type: 'string'
}
]
});
}
async run(msg, { query }) {
try {
const search = await request
.get('http://api.themoviedb.org/3/search/tv')
.query({
api_key: TMDB_KEY,
include_adult: msg.channel.nsfw || false,
query
});
if (!search.body.results.length) return msg.say('Could not find any results.');
let find = search.body.results.find(m => m.name.toLowerCase() === query.toLowerCase())
|| search.body.results[0];
if (search.body.results.length > 1) {
const resultListFunc = (show, i) => `**${i + 1}.** ${show.name} (${show.first_air_date || 'TBA'})`;
find = await pickWhenMany(msg, search.body.results, find, resultListFunc);
}
const { body } = await request
.get(`https://api.themoviedb.org/3/tv/${find.id}`)
.query({ api_key: TMDB_KEY });
const embed = new MessageEmbed()
.setColor(0x00D474)
.setTitle(body.name)
.setURL(`https://www.themoviedb.org/tv/${body.id}`)
.setAuthor('TMDB', 'https://i.imgur.com/3K3QMv9.png', 'https://www.themoviedb.org/')
.setDescription(body.overview ? shorten(body.overview) : 'No description available.')
.setThumbnail(body.poster_path ? `https://image.tmdb.org/t/p/w500${body.poster_path}` : null)
.addField(' First Air Date', body.first_air_date || '???', true)
.addField(' Last Air Date', body.last_air_date || '???', true)
.addField(' Seasons', body.number_of_seasons ? formatNumber(body.number_of_seasons) : '???', true)
.addField(' Episodes', body.number_of_episodes ? formatNumber(body.number_of_episodes) : '???', true)
.addField(' Genres', body.genres.length ? body.genres.map(genre => genre.name).join(', ') : '???')
.addField(' Production Companies',
body.production_companies.length ? body.production_companies.map(c => c.name).join(', ') : '???');
return msg.embed(embed);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};