Getting values from a Modal and then use it on an Embed

Trying to get thee values but not working!
29 Replies
d.js docs
d.js docs3y 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.
chewie
chewie3y ago
whats not working about it
Mardroide
MardroideOP3y ago
im trying to get that values from a Modal and then use it on and embed. When I submit it doesn't do nothing
chewie
chewie3y ago
show the whole event, not part of it are you even sending the embed
Mardroide
MardroideOP3y ago
yep here is the code https://sourceb.in/3Ree9QiSNV
chewie
chewie3y ago
you have to place the modal interaction part in your interactionCreate event
Mardroide
MardroideOP3y ago
like do 2 files the command and the the event
chewie
chewie3y ago
you should already have the event somewhere otherwise this whole file is obsolete
Mardroide
MardroideOP3y ago
obsolete why?
chewie
chewie3y ago
cuz it wouldnt execute without the shrug
Mardroide
MardroideOP3y ago
ohh yeah im fixing it, sorry 😦 How can I get the custom id of the modal
chewie
chewie3y ago
interaction.customId
Mardroide
MardroideOP3y ago
its always the same for modals and buttons, etc..
Mardroide
MardroideOP3y ago
Now it appears other problem
chewie
chewie3y ago
if you wouldnt hide half the error one could help you
Mardroide
MardroideOP3y ago
errors: [
[
3,
CombinedPropertyError: Received one or more errors
at ObjectValidator.handleIgnoreStrategy (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:1223:72)
at ObjectValidator.handleStrategy (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:1102:47)
at ObjectValidator.handle (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:1193:17)
at ObjectValidator.run (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:128:23)
at ArrayValidator.handle (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:457:37)
at ArrayValidator.parse (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:142:88)
at EmbedBuilder.addFields (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@discordjs\builders\dist\messages\embed\Embed.cjs:17:42)
at Object.execute (C:\Users\Marcos\Desktop\Core-Bot\Events\Sistemas\modals-system.js:18:14)
at Client.<anonymous> (C:\Users\Marcos\Desktop\Core-Bot\Handlers\eventsHandler.js:12:58)
at Client.emit (node:events:525:35) {
errors: [ [ 'value', [ExpectedConstraintError] ] ]
}
]
]
}
errors: [
[
3,
CombinedPropertyError: Received one or more errors
at ObjectValidator.handleIgnoreStrategy (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:1223:72)
at ObjectValidator.handleStrategy (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:1102:47)
at ObjectValidator.handle (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:1193:17)
at ObjectValidator.run (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:128:23)
at ArrayValidator.handle (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:457:37)
at ArrayValidator.parse (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@sapphire\shapeshift\dist\index.js:142:88)
at EmbedBuilder.addFields (C:\Users\Marcos\Desktop\Core-Bot\node_modules\@discordjs\builders\dist\messages\embed\Embed.cjs:17:42)
at Object.execute (C:\Users\Marcos\Desktop\Core-Bot\Events\Sistemas\modals-system.js:18:14)
at Client.<anonymous> (C:\Users\Marcos\Desktop\Core-Bot\Handlers\eventsHandler.js:12:58)
at Client.emit (node:events:525:35) {
errors: [ [ 'value', [ExpectedConstraintError] ] ]
}
]
]
}
Mardroide
MardroideOP3y ago
chewie
chewie3y ago
one of the fields has no value
Mardroide
MardroideOP3y ago
all 4 have a value
chewie
chewie3y ago
evidentially, no log them
Mardroide
MardroideOP3y ago
ohh it should be the not required one yeah im doing it, thanks same error umm I have to convert it to a String?
Mardroide
MardroideOP3y ago
Mardroide
MardroideOP3y ago
or you mean on the const it works all but the last one nop
Mardroide
MardroideOP3y ago
Mardroide
MardroideOP3y ago
all its correct but the last one its not required
Mardroide
MardroideOP3y ago
Mardroide
MardroideOP3y ago
im doing a screenshot of the modal to show you
Mardroide
MardroideOP3y ago
Mardroide
MardroideOP3y ago
ohh okay 1 sec should be short? https://sourceb.in/pJ1aL30o78 it set it the max to 256 okey yeah it was that! thanks for your help!
Want results from more Discord servers?
Add your server