Files
2024-05-21 21:02:12 -04:00

52 lines
1.1 KiB
JavaScript

const Command = require('../../framework/Command');
const { PermissionFlagsBits } = require('discord.js');
module.exports = class PokedexImageCommand extends Command {
constructor(client) {
super(client, {
name: 'pokedex-image',
aliases: [
'pokemon-image',
'pokémon-image',
'pokédex-image',
'pkmn-image',
'pokedex-img',
'pokémon-img',
'pokemon-img',
'pokédex-img',
'pkmn-img'
],
group: 'pokedex',
description: 'Responds with the image of a Pokémon.',
clientPermissions: [PermissionFlagsBits.AttachFiles],
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',
type: 'pokemon'
}
]
});
}
run(msg, { pokemon }) {
return msg.say(`#${pokemon.displayID} - ${pokemon.name}`, { files: [pokemon.spriteImageURL] });
}
};