Add names to pokemon-fusion

This commit is contained in:
Daniel Odendahl Jr
2018-10-18 00:01:59 +00:00
parent 6967bca589
commit 7c502e2ba9
2 changed files with 9 additions and 4 deletions
+8 -3
View File
@@ -1,5 +1,6 @@
const Command = require('../../structures/Command');
const pokemon = require('../../assets/json/pokemon-fusion');
const { firstUpperCase } = require('../../util/Util');
module.exports = class PokemonFusionCommand extends Command {
constructor(client) {
@@ -19,7 +20,7 @@ module.exports = class PokemonFusionCommand extends Command {
if (pokemon[body.toLowerCase()]) return true;
return 'Invalid body, only Pokémon from Generation I may be used.';
},
parse: body => pokemon[body.toLowerCase()]
parse: body => body.toLowerCase()
},
{
key: 'palette',
@@ -29,13 +30,17 @@ module.exports = class PokemonFusionCommand extends Command {
if (pokemon[palette.toLowerCase()]) return true;
return 'Invalid palette, only Pokémon from Generation I may be used.';
},
parse: palette => pokemon[palette.toLowerCase()]
parse: palette => palette.toLowerCase()
}
]
});
}
run(msg, { body, palette }) {
return msg.say({ files: [`http://images.alexonsager.net/pokemon/fused/${body}/${body}.${palette}.png`] });
const prefix = body.slice(0, Math.round(body.length / 2));
const suffix = palette.slice(Math.round(palette.length / 2), palette.length);
return msg.say(firstUpperCase(`${prefix}${suffix}`), {
files: [`http://images.alexonsager.net/pokemon/fused/${pokemon[body]}/${pokemon[body]}.${pokemon[palette]}.png`]
});
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "95.1.1",
"version": "95.1.2",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {