ItzExotical
ItzExotical
Explore posts from servers
SIASapphire - Imagine a framework
Created by ItzExotical on 1/19/2024 in #sapphire-support
ValidationError: Expected a string primitive
I fixed it, my dev had accidentally removed the .setLabel().
6 replies
SIASapphire - Imagine a framework
Created by ItzExotical on 1/19/2024 in #sapphire-support
ValidationError: Expected a string primitive
I am making a modal, and the error occurs when I try to open it.
const modal = new ModalBuilder()
.setCustomId("ticketing-settings")
.setTitle("📝 Ticketing Settings")

const limitInput = new TextInputBuilder()
.setCustomId("ticketing-settings-ticketlimit")
.setPlaceholder("Enter a number between 1 and 10")
.setMaxLength(1)
.setRequired(true)
.setStyle(TextInputStyle.Short)

const actionRow = new ActionRowBuilder<TextInputBuilder>().addComponents(limitInput);
modal.addComponents(actionRow);

await buttonInteraction.showModal(modal);
const modal = new ModalBuilder()
.setCustomId("ticketing-settings")
.setTitle("📝 Ticketing Settings")

const limitInput = new TextInputBuilder()
.setCustomId("ticketing-settings-ticketlimit")
.setPlaceholder("Enter a number between 1 and 10")
.setMaxLength(1)
.setRequired(true)
.setStyle(TextInputStyle.Short)

const actionRow = new ActionRowBuilder<TextInputBuilder>().addComponents(limitInput);
modal.addComponents(actionRow);

await buttonInteraction.showModal(modal);
6 replies