Files
xiao/commands/image-edit/pokemon-fusion.js
T
Daniel Odendahl Jr db7c6a9c76 Fix up perms
2017-09-17 02:48:52 +00:00

42 lines
1.3 KiB
JavaScript

const Command = require('../../structures/Command');
const pokemon = require('../../assets/json/pokemon-fusion');
module.exports = class PokemonFusionCommand extends Command {
constructor(client) {
super(client, {
name: 'pokemon-fusion',
aliases: ['poke-fusion', 'poke-fuse', 'pokémon-fusion', 'poké-fusion', 'poké-fuse'],
group: 'image-edit',
memberName: 'pokemon-fusion',
description: 'Fuses two Generation I Pokémon together.',
clientPermissions: ['ATTACH_FILES'],
args: [
{
key: 'body',
prompt: 'What Pokémon should be fused as the body?',
type: 'string',
validate: body => {
if (pokemon[body.toLowerCase()]) return true;
return 'Invalid body, only Pokémon from Generation I may be used.';
},
parse: body => pokemon[body.toLowerCase()]
},
{
key: 'palette',
prompt: 'What Pokémon should be fused as the palette?',
type: 'string',
validate: palette => {
if (pokemon[palette.toLowerCase()]) return true;
return 'Invalid palette, only Pokémon from Generation I may be used.';
},
parse: palette => pokemon[palette.toLowerCase()]
}
]
});
}
run(msg, { body, palette }) {
return msg.say({ files: [`http://images.alexonsager.net/pokemon/fused/${body}/${body}.${palette}.png`] });
}
};