Add pokedex box sprite

This commit is contained in:
Dragon Fire
2024-03-28 21:50:26 -04:00
parent 7dfa92bb4a
commit 85f8c6a688
+72
View File
@@ -0,0 +1,72 @@
const Command = require('../../framework/Command');
module.exports = class PokedexBoxSpriteCommand extends Command {
constructor(client) {
super(client, {
name: 'pokedex-box-sprite',
aliases: [
'pokemon-box-sprite',
'pokémon-box-sprite',
'pokédex-box-sprite',
'pkmn-box-sprite',
'pokedex-box-image',
'pokedex-box-image',
'pokémon-box-image',
'pokemon-box-image',
'pokédex-box-image',
'pkmn-box-image',
'pokedex-box-img',
'pokémon-box-img',
'pokemon-box-img',
'pokédex-box-img',
'pkmn-box-img',
'pokedex-box',
'pokemon-box',
'pokémon-box',
'pokédex-box',
'pkmn-box'
],
group: 'pokedex',
memberName: 'pokedex-box-sprite',
description: 'Responds with the box sprite of a Pokémon.',
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'Pokémon',
url: 'https://www.pokemon.com/us/',
reason: 'Images, Original Game'
},
{
name: 'PokéAPI',
url: 'https://pokeapi.co/',
reason: 'API'
},
{
name: 'Serebii.net',
url: 'https://www.serebii.net/index2.shtml',
reason: 'Images'
}
],
args: [
{
key: 'pokemon',
prompt: 'What Pokémon would you like to get the box sprite of?',
type: 'pokemon'
}
]
});
}
async run(msg, { pokemon }) {
try {
return msg.say(`#${pokemon.displayID} - ${pokemon.name}`, {
files: [{
attachment: await pokemon.generateBoxImage(),
name: 'box.png'
}]
});
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};