Move deferring into the specific interactions where required. Makes especially validation warnings ephemeral.

This commit is contained in:
Marius Begby committed 2024-01-30 19:21:42 +01:00
1 parent a7aefd085f
commit f3329fceee
36 files changed
+164 -175

No files matched your search

+7 -5
View File
@@ -115,7 +115,7 @@ class QueueCommand extends BaseSlashCommandInteraction {
};
logger.debug('Responding with info embed.');
await interaction.editReply({
await interaction.reply({
embeds: [
new EmbedBuilder()
.setAuthor(this.getEmbedQueueAuthor(interaction, queue, translator))
@@ -160,7 +160,7 @@ class QueueCommand extends BaseSlashCommandInteraction {
logger.debug('Queue exists but there is no current track.');
logger.debug('Responding with info embed.');
return await interaction.editReply({
return await interaction.reply({
embeds: [
new EmbedBuilder()
.setAuthor(this.getEmbedQueueAuthor(interaction, queue, translator))
@@ -173,7 +173,8 @@ class QueueCommand extends BaseSlashCommandInteraction {
)
.setFooter(this.getDisplayFullFooterInfo(interaction, queue, translator))
.setColor(this.embedOptions.colors.info)
]
],
ephemeral: true
});
}
@@ -187,7 +188,7 @@ class QueueCommand extends BaseSlashCommandInteraction {
logger.debug('Specified page was higher than total pages.');
logger.debug('Responding with warning embed.');
await interaction.editReply({
await interaction.reply({
embeds: [
new EmbedBuilder()
.setDescription(
@@ -198,7 +199,8 @@ class QueueCommand extends BaseSlashCommandInteraction {
})
)
.setColor(this.embedOptions.colors.warning)
]
],
ephemeral: true
});
return Promise.resolve();
}