added reply check to command default return actions

This commit is contained in:
mmacierzanka committed 2021-08-29 00:48:58 +02:00
1 parent dd92963ff7
commit 95abc9dc92
1 file changed
+2 -2
+2 -2
View File
@@ -113,9 +113,9 @@ export class Command {
} else if (fnResult instanceof MessageEmbed) {
if (interaction instanceof Message) await interaction?.reply({ embeds: [fnResult] });
else if (interaction instanceof CommandInteraction) await interaction.editReply({ embeds: [fnResult] });
} else if (this.announceSuccess) {
} else if (this.announceSuccess && (interaction instanceof CommandInteraction ? !interaction.replied : true)) {
throw new OperationSuccess(this);
} else if (interaction instanceof CommandInteraction) {
} else if (interaction instanceof CommandInteraction && !interaction.replied) {
await interaction.deleteReply();
}
} else {