Why is this returning as undefined? [NOBLOX.JS | NODE.JS]

So I’m working on something, and whenever a user posts on the group wall, it will log it. However, their username returns as undefined.

This is what I’m doing:

Roblox.onWallPost(8677181).on("data", function(data) {
    const Channel = client.channels.cache.get(`805076642082979840`)
    const Embed = new Discord.MessageEmbed()
    .setTitle(data.poster.username)
    .setDescription(data.body)
    .setColor('YELLOW')

    Channel.send(Embed)
})

The issue is at data.poster.username. Yes, I’ve read the documentation, however it just console logs the data.

Thanks, if you can help!

something else

I have no idea if I can post stuff like this here but it’s related to Roblox and the Roblox API so I guess I can ???

ok so i fixed it by doing

data.poster.user.username

1 Like