mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
Move deferring into the specific interactions where required. Makes especially validation warnings ephemeral.
This commit is contained in:
1 parent
a7aefd085f
commit
f3329fceee
36 files changed
+164
-175
No files matched your search
@@ -22,7 +22,7 @@ export const checkInVoiceChannel = async ({ interaction, executionId }: Validato
|
||||
interaction.type === InteractionType.ApplicationCommand ? interaction.commandName : interaction.customId;
|
||||
|
||||
if (interaction.member instanceof GuildMember && !interaction.member.voice.channel) {
|
||||
await interaction.editReply({
|
||||
await interaction.reply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
@@ -35,7 +35,8 @@ export const checkInVoiceChannel = async ({ interaction, executionId }: Validato
|
||||
text: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
],
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
logger.debug(`User tried to use command '${interactionIdentifier}' but was not in a voice channel.`);
|
||||
@@ -67,7 +68,7 @@ export const checkSameVoiceChannel = async ({ interaction, queue, executionId }:
|
||||
interaction.member instanceof GuildMember &&
|
||||
interaction.member.voice.channel?.id !== queue.dispatcher.channel.id
|
||||
) {
|
||||
await interaction.editReply({
|
||||
await interaction.reply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
@@ -81,7 +82,8 @@ export const checkSameVoiceChannel = async ({ interaction, queue, executionId }:
|
||||
text: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL() || embedOptions.info.fallbackIconUrl
|
||||
})
|
||||
]
|
||||
],
|
||||
ephemeral: true
|
||||
});
|
||||
|
||||
logger.debug(`User tried to use command '${interactionIdentifier}' but was not in the same voice channel.`);
|
||||
|
||||
Reference in new issue
Block a user