Weird colorfull error while constructing embeds (djs14)

I'm trying to build some embeds from json data, but some verifications error about empty strings appear, here is the data:
{
id: 3,
nom: 'venesie',
revenuVille: 13,
revenuCommerce: 270,
revenuDiplomatique: 0,
revenuBonus: 5,
entretienBati: 145,
coutEntretien: 0,
budget: 148,
depense: 0,
culture: 0,
gainCulture: 0,
religion: 15,
gainReligion: 5,
merveille: '',
conscrit: 0,
barbare: 0,
piquier: 0,
legion: 0,
fantassin: 0,
archers: 0,
tours: 0,
trebuchet: 0,
belier: 0,
echelle: 0,
autre: 0,
trireme: 0,
transport: 0,
type: 'légion',
entretienAutre: 0,
tiers1: 10,
tiers2: 0,
tiers3: 1,
tiers4: 0,
tiers5: 0
}
{
id: 3,
nom: 'venesie',
revenuVille: 13,
revenuCommerce: 270,
revenuDiplomatique: 0,
revenuBonus: 5,
entretienBati: 145,
coutEntretien: 0,
budget: 148,
depense: 0,
culture: 0,
gainCulture: 0,
religion: 15,
gainReligion: 5,
merveille: '',
conscrit: 0,
barbare: 0,
piquier: 0,
legion: 0,
fantassin: 0,
archers: 0,
tours: 0,
trebuchet: 0,
belier: 0,
echelle: 0,
autre: 0,
trireme: 0,
transport: 0,
type: 'légion',
entretienAutre: 0,
tiers1: 10,
tiers2: 0,
tiers3: 1,
tiers4: 0,
tiers5: 0
}
6 Replies
d.js toolkit
d.js toolkit2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Awing
AwingOP2y ago
here's the code (part of it)
Awing
AwingOP2y ago
and here's the error
Awing
AwingOP2y ago
it seems that it add empty string to my fields but it should have smtg in there so idk
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Awing
AwingOP2y ago
ok there was some typo that i didn't seen at first thx
Want results from more Discord servers?
Add your server