Creating slash commands
How do I create slash commands? Currently, I am just listening for messages and checking if the message is "/verify" but how do I make it an actual slash command? Thanks for any help 🙂
17 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 OPi tried that
it didn't really work for me
define didnt work
nothing happened
i followed the tutorial
and no commands showed up
show your code
i deleted it cuz i tried ages ago
ill try again rn and show code if it doesnt work
ty
You also need to register them to show up
i did
im trying again rn
it says
i need to use collections
what is equivalent to Array.push() but for Collection()?
set
Collection#set()
Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
will that push to the end?
oh
it uses keys and values
Collections are just Maps
ok
the tutorial isnt working
it adds the commands to a commands array but it tries to get them from a commands collection?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
i got it to work
but that tutorial isnt great
thanks guys