recognize user
I want to make a command that reads all the arguments given to a user with a keyboard and looks for which of those messages are IDs of existing people, and if it finds them, it returns all the ones it found in the form of a mention.
I have this code:
but it doesn't work
5 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!It does not send an error to the console but it does not return anything either.
first of all why dont you use slash commands, they have built in validation
second, does that function run at all
If you aren't getting any errors, try to place
console.log
checkpoints throughout your code to find out where execution stops.
- Once you do, log relevant values and if-conditions
- More sophisticated debugging methods are breakpoints and runtime inspections: learn moreI don't like using slash command and for that command I don't find it necessary