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], embeds: [fnResult],
}); });
} else { } else {
interaction.replied interaction.replied &&
? await interaction.editReply({ (await interaction.editReply({
embeds: [ embeds: [
new MessageEmbed() new MessageEmbed()
.setColor("#00ff00") .setColor("#00ff00")
.setTitle( .setTitle(
"✅ Task completed successfully" "✅ Task completed successfully"
), ),
], ],
}) }));
: await interaction.reply({
embeds: [
new MessageEmbed()
.setColor("#00ff00")
.setTitle(
"✅ Task completed successfully"
),
],
});
} }
} catch (e) { } catch (e) {
console.error("[❌ ERROR] Cannot reply.", e); console.error("[❌ ERROR] Cannot reply.", e);