mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix defer
This commit is contained in:
1 parent
f3329fceee
commit
30abb470b9
2 files changed
+7
-4
No files matched your search
@@ -62,7 +62,8 @@ export const handleError = async (
|
|||||||
return;
|
return;
|
||||||
case false:
|
case false:
|
||||||
logger.debug('Responding with error embed');
|
logger.debug('Responding with error embed');
|
||||||
return await interaction.editReply(errorReply);
|
interaction.deferred ? await interaction.editReply(errorReply) : await interaction.reply(errorReply);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else if (interaction instanceof MessageComponentInteraction) {
|
} else if (interaction instanceof MessageComponentInteraction) {
|
||||||
switch (interaction.replied) {
|
switch (interaction.replied) {
|
||||||
@@ -74,7 +75,8 @@ export const handleError = async (
|
|||||||
return;
|
return;
|
||||||
case false:
|
case false:
|
||||||
logger.debug('Responding with error embed');
|
logger.debug('Responding with error embed');
|
||||||
return await interaction.editReply(errorReply);
|
interaction.deferred ? await interaction.editReply(errorReply) : await interaction.reply(errorReply);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class ActionPreviousButton extends BaseComponentInteraction {
|
|||||||
translator: TFunction
|
translator: TFunction
|
||||||
) {
|
) {
|
||||||
logger.debug('No tracks in history.');
|
logger.debug('No tracks in history.');
|
||||||
return await interaction.editReply({
|
return await interaction.reply({
|
||||||
embeds: [
|
embeds: [
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setDescription(
|
.setDescription(
|
||||||
@@ -68,7 +68,8 @@ class ActionPreviousButton extends BaseComponentInteraction {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
.setColor(this.embedOptions.colors.warning)
|
.setColor(this.embedOptions.colors.warning)
|
||||||
]
|
],
|
||||||
|
ephemeral: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user