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
+3 -12
+3 -12
View File
@@ -181,8 +181,8 @@ export class Command {
embeds: [fnResult],
});
} else {
interaction.replied
? await interaction.editReply({
interaction.replied &&
(await interaction.editReply({
embeds: [
new MessageEmbed()
.setColor("#00ff00")
@@ -190,16 +190,7 @@ export class Command {
"✅ Task completed successfully"
),
],
})
: await interaction.reply({
embeds: [
new MessageEmbed()
.setColor("#00ff00")
.setTitle(
"✅ Task completed successfully"
),
],
});
}));
}
} catch (e) {
console.error("[❌ ERROR] Cannot reply.", e);