Role in SlashCommand showing @Undefined

I'm making a slash command where role is a required parameter but when I try using it, it is auto filled with @ Undefined.
data: new SlashCommandBuilder()
.setName('addtolineup')
.setDescription('Adds a Reserve Driver to Race Lineup')
.addUserOption(option =>
option.setName('driver')
.setDescription('The Driver who is getting added to a team')
.setRequired(true))
.addRoleOption(option =>
option.setName('constructor')
.setDescription('Constructor Role')
.setRequired(true)),
data: new SlashCommandBuilder()
.setName('addtolineup')
.setDescription('Adds a Reserve Driver to Race Lineup')
.addUserOption(option =>
option.setName('driver')
.setDescription('The Driver who is getting added to a team')
.setRequired(true))
.addRoleOption(option =>
option.setName('constructor')
.setDescription('Constructor Role')
.setRequired(true)),
No description
2 Replies
d.js toolkit
d.js toolkit9mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
duck
duck9mo ago
that's definitely interesting, but unfortunately that's entirely handled by discord your code looks fine