#Modal compilation Error [Expected a string primitive]

2 messages · Page 1 of 1 (latest)

high hollowBOT
#

• 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.

somber cipher
#
   return typeof value === "string" ? Result.ok(value) : Result.err(new ValidationError("s.string", "Expected a string primitive", value));
                                                                     ^

ValidationError: Expected a string primitive
    at StringValidator.handle (/filepath/node_modules/@sapphire/shapeshift/dist/index.js:1654:70)
    at StringValidator.parse (/filepath/node_modules/@sapphire/shapeshift/dist/index.js:113:88)
    at Object.validateRequiredParameters (/filepath/node_modules/@discordjs/builders/dist/interactions/modals/Assertions.cjs:14:18)
    at ModalBuilder.toJSON (/filepath/node_modules/@discordjs/builders/dist/interactions/modals/Modal.cjs:38:16)
    at ButtonInteraction.showModal (/filepath/node_modules/discord.js/src/structures/interfaces/InteractionResponses.js:248:46)
    at Object.execute (file:///filepath/src/interactions/statePartnersAdd.js:35:27)
    at Object.execute (file:////filepathsrc/events/interactionCreate.js:76:28)
    at Client.<anonymous> (file:////filepath/src/handlers/events.js:9:72)
    at Client.emit (node:events:527:28)
    at InteractionCreateAction.handle (/filepath/node_modules/discord.js/src/client/actions/InteractionCreate.js:81:12) {
  validator: 's.string',
  given: undefined
}