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 docs2y 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 🌈
chewie 🌈2y ago
whats not working about it
Mardroide
Mardroide2y 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 🌈
chewie 🌈2y ago
show the whole event, not part of it are you even sending the embed
Mardroide
Mardroide2y ago
yep here is the code https://sourceb.in/3Ree9QiSNV
chewie 🌈
chewie 🌈2y ago
you have to place the modal interaction part in your interactionCreate event
Mardroide
Mardroide2y ago
like do 2 files the command and the the event
chewie 🌈
chewie 🌈2y ago
you should already have the event somewhere otherwise this whole file is obsolete
Mardroide
Mardroide2y ago
obsolete why?
chewie 🌈
chewie 🌈2y ago
cuz it wouldnt execute without the shrug
Mardroide
Mardroide2y ago
ohh yeah im fixing it, sorry 😦 How can I get the custom id of the modal
chewie 🌈
chewie 🌈2y ago
interaction.customId
Mardroide
Mardroide2y ago
its always the same for modals and buttons, etc..
Mardroide
Mardroide2y ago
Now it appears other problem
chewie 🌈
chewie 🌈2y ago
if you wouldnt hide half the error one could help you
Mardroide
Mardroide2y 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
Mardroide2y ago
chewie 🌈
chewie 🌈2y ago
one of the fields has no value
Mardroide
Mardroide2y ago
all 4 have a value
chewie 🌈
chewie 🌈2y ago
evidentially, no log them
Mardroide
Mardroide2y 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
Mardroide2y ago
Mardroide
Mardroide2y ago
or you mean on the const it works all but the last one nop
Mardroide
Mardroide2y ago
Mardroide
Mardroide2y ago
all its correct but the last one its not required
Mardroide
Mardroide2y ago
Mardroide
Mardroide2y ago
im doing a screenshot of the modal to show you
Mardroide
Mardroide2y ago
Mardroide
Mardroide2y 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!