Closed GuikiPT closed 3 years ago
It's normal, it's a Node feature for not displaying too much output in the console. The properties are there
I will try to do that now and when I get something soon I say and close this problem
Hi again, I tried to do what you said, and get the specific information from one of the pokedex api json variables, but he still "Object" both in the console, as in message.reply()
I used the same code base as this one on github, and only added a few variables to make interpletting easier, but still from "Object"
P.getPokemonByName('eevee') // with Promise
.then(function(response) {
console.log(response);
const pokename = response.name;
const pokeabilities = response.abilities;
console.log(`Name: ${pokename}`);
console.log(`Ability: ${pokeabilities}`);
message.reply(pokeabilities);
})
any way to overcome this? I also tried to do it using an https catch but give it to me in the same
Of course it happens, you are trying to print an object in a template literal. If you really wanna have a JSON displayed you should JSON.stringify() it.
But showing a JSON in a discord message is a bit odd, no?
thanks its that, its JSON.stingify()
thanks again xD
Hello, im testing the PokéAPI with pokedex-promise-v2 and when i sent this to console, im getting some information with [object]
here its a example from the pokemon