Expected a string primitive

Keep getting this from my embed fields input.value | | ValidationError > s.string | | Expected a string primitive | | | | Received: | | | 720
const embed = new EmbedBuilder()
.setColor(0xFF6122)
.setTitle(answer.username)
.setURL(userlink)
.setThumbnail(answer.avatar)
.setTimestamp()
.setFooter({
text: `Project Athena`,
})
.addFields([
{
name: 'Nickname',
value: answer.name
},
{
name: 'Creation Date',
value: answer.createDate
},
{
name: 'Following',
value: answer.numFollowing
},
{
name: 'Followers',
value: answer.numFollowers
},
{
name: 'Reading Lists',
value: answer.numLists
},
{
name: 'Works',
value: answer.numStoriesPublished
},
]);


const embed = new EmbedBuilder()
.setColor(0xFF6122)
.setTitle(answer.username)
.setURL(userlink)
.setThumbnail(answer.avatar)
.setTimestamp()
.setFooter({
text: `Project Athena`,
})
.addFields([
{
name: 'Nickname',
value: answer.name
},
{
name: 'Creation Date',
value: answer.createDate
},
{
name: 'Following',
value: answer.numFollowing
},
{
name: 'Followers',
value: answer.numFollowers
},
{
name: 'Reading Lists',
value: answer.numLists
},
{
name: 'Works',
value: answer.numStoriesPublished
},
]);


9 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.
Haize
HaizeOP2y ago
[email protected] node v19.8.1 it does that for all, the value results that are meant to return numbers just broke today, cause I've been using that format for a while now, so I'm not sure
treble/luna
treble/luna2y ago
one of your fields isnt a string, perhaps a number
Haize
HaizeOP2y ago
the ones that are numbers are the ones returning errors yeah
treble/luna
treble/luna2y ago
well fields values are strings not numbers
Haize
HaizeOP2y ago
huh
treble/luna
treble/luna2y ago
so stringify them
Haize
HaizeOP2y ago
ohhh thanks a lot!
treble/luna
treble/luna2y ago
Yw
Want results from more Discord servers?
Add your server