This commit is contained in:
Daniel Odendahl Jr
2017-04-16 17:10:42 +00:00
parent 30c4676b12
commit 3d34d042e1
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class PokedexCommand extends Command {
.get(`http://pokeapi.co/api/v2/pokemon/${pokemon}`);
const data = response.body;
const entry = pokedex.entry[pokemon] || 'Not Yet Implemented';
const indexZero = '000'.slice(data.id.length);
const indexZero = '000'.slice(data.id.toString().length);
const type1 = data.types[1] ? data.types[1].type.name : '-';
const type2 = data.types[0] ? data.types[0].type.name : '-';
const embed = new RichEmbed()