Error - const roleId = interaction.options.getString('role_id');
Morning all,
I've been having this error since last night and I've seen a few people with the same error on Stackoverflow but didn't find any working solutions... This is for my Role React Command and I've getting the error seen in the title. Any help would be great 🙂
addreactrole.js - Broken Area
ready.js (Nothings wrong here but might be needed)
10 Replies
- 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!
- ✅
Marked as resolved by OPThe order of function parameters must match between definition and function call.
- mismatch! you pass an interaction where the client is expected
- mismatch! you pass the client where an interaction is expected
also
You never even pass in the interaction
You just pass in your client
You're talking about the ready.js? If so I've tried making it (client, interaction) Vice Versa.
Regardless thanks for the info, I'll go ahead and try to fix it 🙂
It's right above the top part
I dont see you handling that command interaction anywhere
It's at the bottom here
no
The only thing i see you handling are buttons
Not ChatInputCommands
Do you have a /tag for that lol
BaseInteraction#isChatInputCommand()
Indicates whether this interaction is a ChatInputCommandInteraction.
❤️