Interaction already awknoledged
code:
case 'remove':
const name = interaction.options.getString('name')
const deleteSwitch = new EmbedBuilder()
.setColor('Red')
.setDescription(`Switch ${name} deletado.`)
.setThumbnail("https://rustlabs.com/img/items180/smart.switch.png")
interaction.reply({ embeds: [deleteSwitch] })
switchSchema.findOneAndDelete({ Switchs: name }, async (data) => {
if (!data) {
interaction.reply({ embeds: [no_data] })
} else if (data) {
data.save()
}
})
break;
case 'remove':
const name = interaction.options.getString('name')
const deleteSwitch = new EmbedBuilder()
.setColor('Red')
.setDescription(`Switch ${name} deletado.`)
.setThumbnail("https://rustlabs.com/img/items180/smart.switch.png")
interaction.reply({ embeds: [deleteSwitch] })
switchSchema.findOneAndDelete({ Switchs: name }, async (data) => {
if (!data) {
interaction.reply({ embeds: [no_data] })
} else if (data) {
data.save()
}
})
break;
3 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
case 'remove':
const name = interaction.options.getString('name')
const deleteSwitch = new EmbedBuilder()
.setColor('Red')
.setDescription(`Switch ${name} deletado.`)
.setThumbnail("https://rustlabs.com/img/items180/smart.switch.png")
interaction.reply({ embeds: [deleteSwitch] });
switchSchema.findOneAndDelete({ Switchs: name }, async (data) => {
if (!data) {
interaction.reply({ embeds: [no_data] })
} else if (data) {
data.save()
}
})
break;
case 'remove':
const name = interaction.options.getString('name')
const deleteSwitch = new EmbedBuilder()
.setColor('Red')
.setDescription(`Switch ${name} deletado.`)
.setThumbnail("https://rustlabs.com/img/items180/smart.switch.png")
interaction.reply({ embeds: [deleteSwitch] });
switchSchema.findOneAndDelete({ Switchs: name }, async (data) => {
if (!data) {
interaction.reply({ embeds: [no_data] })
} else if (data) {
data.save()
}
})
break;
interaction.reply
twice, that's the issuekk , thank you