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
d.js toolkit
d.js toolkit14mo ago
- 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 OP
SikoticVinyl
SikoticVinylOP14mo ago
No description
Danial
Danial14mo ago
Are 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
SikoticVinyl
SikoticVinylOP14mo ago
No description
d.js docs
d.js docs14mo ago
To share long code snippets, use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks or files.
SikoticVinyl
SikoticVinylOP14mo ago
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
Danial
Danial14mo ago
You click one of the links above and paste your code in it, click save and send the link here
d.js docs
d.js docs14mo ago
Suggestion for @SikoticVinyl:guide Other Interactions: Modals read more
SikoticVinyl
SikoticVinylOP14mo ago
<:ab_ThumbsUp:887742001800437791>
Seren_Modz 21
Seren_Modz 2114mo ago
u can't send modals through components. u have to use interactions (eg. a button or slash command) and the showModal method
d.js docs
d.js docs14mo ago
method ButtonInteraction#showModal() Shows a modal component
SikoticVinyl
SikoticVinylOP14mo ago
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
SourceBin
Modal Sikotic
Instantly share your code with the world.

Did you find this page helpful?