#Broken modals
1 messages · Page 1 of 1 (latest)
public async createTask(interaction: Subcommand.ChatInputCommandInteraction) {
const modal = new ModalBuilder()
.setCustomId("CreateTaskModal")
.setTitle("Create Task");
const embedColorInput = new TextInputBuilder()
.setCustomId("embedColor")
.setLabel("Set the color of the embed")
.setPlaceholder("#C4F94B")
.setStyle(TextInputStyle.Short)
.setValue("#C4F94B")
.setRequired(true);
const embedThumbnailInput = new TextInputBuilder()
.setCustomId("embedThumbnail")
.setLabel("Thumbnail of the embed")
.setPlaceholder("https://i.imgur.com/IlweEFM.gif")
.setStyle(TextInputStyle.Short)
.setRequired(false);
const pointInput = new TextInputBuilder()
.setCustomId("taskPoint")
.setLabel("Set the point value of the task")
.setPlaceholder("10")
.setValue("10")
.setStyle(TextInputStyle.Short)
.setRequired(true);
const taskDescriptionInput = new TextInputBuilder()
.setCustomId("taskDescription")
.setLabel("Set the description of the task")
.setPlaceholder("Here is your description")
.setStyle(TextInputStyle.Paragraph)
.setRequired(true);
const rows = [
new ActionRowBuilder<ModalActionRowComponentBuilder>().addComponents(
taskDescriptionInput
),
new ActionRowBuilder<ModalActionRowComponentBuilder>().addComponents(
embedThumbnailInput
),
new ActionRowBuilder<ModalActionRowComponentBuilder>().addComponents(
pointInput
),
new ActionRowBuilder<ModalActionRowComponentBuilder>().addComponents(
embedColorInput
),
];
modal.addComponents(rows);
await interaction.showModal(modal);
Code looks... Fine.. I think.
i deleted app command from gui
then recreated
btw is this good code
for writing modals
At a glance, yes
For @edgy crypt 's eval (me only, don't bother trying to use it) I have this: https://github.com/favware/dragonite/blob/main/src/commands/Admin/eval.ts
@rustic gorge for example
sometimes it becomes like this
but there is nothing in my code like this
sometimes this
as you can see there is no point
should i defer or something else when i reply interaction
because when i submit
im not replying command
im sending global text