Holygent
Holygent
DIAdiscord.js - Imagine an app
Created by Holygent on 3/2/2025 in #djs-questions
ValidationError: Expected the value to be a string or number
For some reason it works now. Thank you.
7 replies
DIAdiscord.js - Imagine an app
Created by Holygent on 3/2/2025 in #djs-questions
ValidationError: Expected the value to be a string or number
Further, the problem arose when I added the type TextInputBuilder(). It could work before then
7 replies
DIAdiscord.js - Imagine an app
Created by Holygent on 3/2/2025 in #djs-questions
ValidationError: Expected the value to be a string or number
Please note that the code continues here. I split it up because of the 2,000-character limit
7 replies
DIAdiscord.js - Imagine an app
Created by Holygent on 3/2/2025 in #djs-questions
ValidationError: Expected the value to be a string or number
at validateRequiredParameters (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1252:27)
at TextInputBuilder.toJSON (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1364:5)
at /Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1479:64
at Array.map (<anonymous>)
at ActionRowBuilder.toJSON (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1479:35)
at /Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1570:64
at Array.map (<anonymous>)
at ModalBuilder.toJSON (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1570:35)
at validateRequiredParameters (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1252:27)
at TextInputBuilder.toJSON (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1364:5)
at /Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1479:64
at Array.map (<anonymous>)
at ActionRowBuilder.toJSON (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1479:35)
at /Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1570:64
at Array.map (<anonymous>)
at ModalBuilder.toJSON (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@discordjs/builders/dist/index.js:1570:35)
7 replies
DIAdiscord.js - Imagine an app
Created by Holygent on 3/2/2025 in #djs-questions
ValidationError: Expected the value to be a string or number
.setStyle(TextInputStyle.Short)
.setRequired(false)
const row3 = new ActionRowBuilder()
.addComponents(profile)
const images = new TextInputBuilder()
.setCustomId('SELL_EC_1_IMAGES')
.setLabel('Images of your creation')
.setPlaceholder('Separate by a comma and a space. https://cdn.discordapp.com/attachments/..., https://...')
.setStyle(TextInputStyle.Paragraph)
.setRequired(false)
const row4 = new ActionRowBuilder()
.addComponents(images)
const modal = new ModalBuilder()
.setCustomId('SELL_EC_2')
.setTitle('New Listing')
.addComponents(row0, row1, row2, row3, row4)
await interaction.showModal(modal)
.setStyle(TextInputStyle.Short)
.setRequired(false)
const row3 = new ActionRowBuilder()
.addComponents(profile)
const images = new TextInputBuilder()
.setCustomId('SELL_EC_1_IMAGES')
.setLabel('Images of your creation')
.setPlaceholder('Separate by a comma and a space. https://cdn.discordapp.com/attachments/..., https://...')
.setStyle(TextInputStyle.Paragraph)
.setRequired(false)
const row4 = new ActionRowBuilder()
.addComponents(images)
const modal = new ModalBuilder()
.setCustomId('SELL_EC_2')
.setTitle('New Listing')
.addComponents(row0, row1, row2, row3, row4)
await interaction.showModal(modal)
Here's the entire log:
LOC31: ValidationError > s.nativeEnum(T)
Expected the value to be a string or number

Received:
| undefined

at _NativeEnumValidator.handle (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2788:9)
at _NativeEnumValidator.parse (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90)

LOC31: ValidationError > s.nativeEnum(T)
Expected the value to be a string or number

Received:
| undefined

at _NativeEnumValidator.handle (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:2788:9)
at _NativeEnumValidator.parse (/Users/holygent/Desktop/RoGet-DiscordServer/RoGet/node_modules/@sapphire/shapeshift/dist/cjs/index.cjs:972:90)

7 replies