TypeError [CommandInteractionOptionType]

I am trying to make a command where the user can choose an amount and that amount will later be used in an interaction. When I define the amount in the code itself, it works just fine, but when the user puts in the amount with the help of NumberOption, it gives this error:
Option "amount" is of type: 10; expected 3
Option "amount" is of type: 10; expected 3
4 Replies
d.js docs
d.js docs2y 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.
Danial
Danial2y ago
14.1.2 and 16.15.1
chewie 🌈
chewie 🌈2y ago
• Show your code!
use interaction.options.getNumber("amount")
Danial
Danial2y ago
Yep, works now, got confused with String and Number Thank you!