Help with command!

Hello good afternoon, I ask you as a favor if you can help me since I have been trying to make a command for more than 1 week. The command consists of a button that sends an embed and a select menu and as you select things the embed and the select menu are updated to continue choosing
3 Replies
d.js toolkit
d.js toolkit2y 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.
d.js docs
d.js docs2y ago
To help you we need more information: - What are you trying to do? - What is your code? - What errors and debug logs do you have?
MrRober
MrRoberOP2y ago
client.on('interactionCreate',async interac => {
try{

if(interac.customId === 'startorder'){
await Start.StartOrderCode(interac);
}


if (interac.isStringSelectMenu()) {
if(interac.customId === 'Service'){
DataOrder.service = interac.values[0];

await menuSelect.createMenuSelect(interac,"Platform");
await Embeds.EditEmbed(interac, DataOrder);
}

if(interac.customId === 'Platform'){
DataOrder.platform = interac.values[0];
await Embeds.EditEmbed(interac, DataOrder);
await menuSelect.createMenuSelect(interac,"Payment");


}

if(interac.customId === 'Payment'){
DataOrder.payment = interac.values[0];
await Embeds.EditEmbed(interac, DataOrder);
//await MenuSelect(interaction,"Platform");
await buttons.buttonConfirmCancelOrder(interac)
await interac.deferUpdate();
}

}


if(interac.customId === 'confirm'){
await Thread.CreateTicketThreads(interaction, interac, DataOrder);
await interac.deleteReply()
}
}catch(e){
interac.reply({content: 'Error: ' + e});
}
});
client.on('interactionCreate',async interac => {
try{

if(interac.customId === 'startorder'){
await Start.StartOrderCode(interac);
}


if (interac.isStringSelectMenu()) {
if(interac.customId === 'Service'){
DataOrder.service = interac.values[0];

await menuSelect.createMenuSelect(interac,"Platform");
await Embeds.EditEmbed(interac, DataOrder);
}

if(interac.customId === 'Platform'){
DataOrder.platform = interac.values[0];
await Embeds.EditEmbed(interac, DataOrder);
await menuSelect.createMenuSelect(interac,"Payment");


}

if(interac.customId === 'Payment'){
DataOrder.payment = interac.values[0];
await Embeds.EditEmbed(interac, DataOrder);
//await MenuSelect(interaction,"Platform");
await buttons.buttonConfirmCancelOrder(interac)
await interac.deferUpdate();
}

}


if(interac.customId === 'confirm'){
await Thread.CreateTicketThreads(interaction, interac, DataOrder);
await interac.deleteReply()
}
}catch(e){
interac.reply({content: 'Error: ' + e});
}
});
Error: The reply to this interacion has not been sent or deferred Button start order:
const start = new ButtonBuilder()
.setCustomId('startorder')
.setLabel('Start Order')
.setStyle(ButtonStyle.Success);

const row = new ActionRowBuilder()
.addComponents( start );

interaction.reply({
components: [row]
});
const start = new ButtonBuilder()
.setCustomId('startorder')
.setLabel('Start Order')
.setStyle(ButtonStyle.Success);

const row = new ActionRowBuilder()
.addComponents( start );

interaction.reply({
components: [row]
});
and y try to edit reply on the StartOrderCode but nsend the error I just want if possible a basic example of this thanks and sry for the inconvenience
Want results from more Discord servers?
Add your server