I have encountered an issue while programming a discord bot recently. One of the challenges I am facing is that I have created an object array to store a user and a string when they execute l!start
.
However, I am unsure of how to retrieve a user's name and discriminator using discord.js.
var usersStarters = [
];
// other code
usersStarters.push({
<member>.user.username + <member>.user.discriminator: "string"
});
The current state of my code is as shown above. Although <member>.user.username
and
<member>.user.discriminator
seem to be incorrect, I am not sure what alternative approach to take.