New - Modal Support
Hello so I am pretty new to discord.js overall and am trying to work out how to build a modal and was wondering if anyone had some good tips or would be able to address some questions as they come up?
I was able to get the modal to come up once but it broke again and I am not sure why. Currently it is giving me some sort of error over modal type? Ill share screens
13 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 OPAre you following the guide? And seems like you're not responding to the modal interaction, please use a bin to share the code instead of pictures of the code
Im really super new to all this how do I use bin?
I have been looking over the discord.js docs in modalbuilder but im struggling a bit to understand it
You click one of the links above and paste your code in it, click save and send the link here
<:ab_ThumbsUp:887742001800437791>
u can't send modals through components. u have to use interactions (eg. a button or slash command) and the showModal method
So I have gone through the guide and overhauled my code to only work on slash commands now.
I was able to get it so that a modal pops up when using the ping command by following the guide but when I try to update the command name and make it its own command its giving errors.
Currently the code I have works to show the modal with /ping but I am trying to get the modal to show up with its own command /createitem
https://sourceb.in/OrVu0csSgr