diff --git a/structures/pokemon/Pokemon.js b/structures/pokemon/Pokemon.js index 1cf55dfe..6a22467c 100644 --- a/structures/pokemon/Pokemon.js +++ b/structures/pokemon/Pokemon.js @@ -111,8 +111,8 @@ module.exports = class Pokemon { const { body } = await request.get(`https://pokeapi.co/api/v2/pokemon/${variety.id}`); variety.types.push(...body.types.map(type => firstUpperCase(type.type.name))); for (const ability of body.abilities) { - const { body } = await request.get(ability.ability.url); - variety.abilities.push(body.names.find(name => name.language.name === 'en').name); + const { body: abilityBody } = await request.get(ability.ability.url); + variety.abilities.push(abilityBody.names.find(name => name.language.name === 'en').name); } } this.height = defaultBody.height * 3.94;