no default reply when interaction already replied

This commit is contained in:
mmacierzanka committed 2021-08-08 16:35:34 +02:00
1 parent 9a8bcd3fee
commit c7091d0011
1 file changed
+10 -19
+10 -19
View File
@@ -181,25 +181,16 @@ export class Command {
embeds: [fnResult],
});
} else {
interaction.replied
? await interaction.editReply({
embeds: [
new MessageEmbed()
.setColor("#00ff00")
.setTitle(
"✅ Task completed successfully"
),
],
})
: await interaction.reply({
embeds: [
new MessageEmbed()
.setColor("#00ff00")
.setTitle(
"✅ Task completed successfully"
),
],
});
interaction.replied &&
(await interaction.editReply({
embeds: [
new MessageEmbed()
.setColor("#00ff00")
.setTitle(
"✅ Task completed successfully"
),
],
}));
}
} catch (e) {
console.error("[❌ ERROR] Cannot reply.", e);