Reply interaction after editing voice channel perms

There is a button inside a voice channel's text channel. I need to reply to the interaction after editing the channel's permissions, but it says it has already been acknowledge. But then I try doing a followUp, and it says it hasn't been replied. but I am able to reply to the interaction before I edit the channel's perms. Buttons names are unique, as they contain the channel's id in them too. Interaction has already been acknowledged:
const vcChannel = int.guild.channels.cache.get(channelID);

if (vcChannel instanceof VoiceChannel) {
// Set permissions to deny the mentioned user from viewing the channel
vcChannel.permissionOverwrites.edit(everyoneRoleId, {
Connect: false,
})
.then(() => {
const embed = new EmbedBuilder()
.setColor('#0099ff') // Set the color of the embed
.setDescription(`<@${member.id}>, el canal ha sido bloqueado correctamente.`) // Set the description

// Send the embed with the image attachment
int.reply({
embeds: [embed],
ephemeral: true,
});
})
}
const vcChannel = int.guild.channels.cache.get(channelID);

if (vcChannel instanceof VoiceChannel) {
// Set permissions to deny the mentioned user from viewing the channel
vcChannel.permissionOverwrites.edit(everyoneRoleId, {
Connect: false,
})
.then(() => {
const embed = new EmbedBuilder()
.setColor('#0099ff') // Set the color of the embed
.setDescription(`<@${member.id}>, el canal ha sido bloqueado correctamente.`) // Set the description

// Send the embed with the image attachment
int.reply({
embeds: [embed],
ephemeral: true,
});
})
}
The reply to this interaction has not been sent or deferred:
const vcChannel = int.guild.channels.cache.get(channelID);

if (vcChannel instanceof VoiceChannel) {
// Set permissions to deny the mentioned user from viewing the channel
vcChannel.permissionOverwrites.edit(everyoneRoleId, {
Connect: false,
})
.then(() => {
const embed = new EmbedBuilder()
.setColor('#0099ff') // Set the color of the embed
.setDescription(`<@${member.id}>, el canal ha sido bloqueado correctamente.`) // Set the description

// Send the embed with the image attachment
int.followUp({
embeds: [embed],
ephemeral: true,
});
})
}
const vcChannel = int.guild.channels.cache.get(channelID);

if (vcChannel instanceof VoiceChannel) {
// Set permissions to deny the mentioned user from viewing the channel
vcChannel.permissionOverwrites.edit(everyoneRoleId, {
Connect: false,
})
.then(() => {
const embed = new EmbedBuilder()
.setColor('#0099ff') // Set the color of the embed
.setDescription(`<@${member.id}>, el canal ha sido bloqueado correctamente.`) // Set the description

// Send the embed with the image attachment
int.followUp({
embeds: [embed],
ephemeral: true,
});
})
}
2 Replies
d.js toolkit
d.js toolkit•10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - ✅ Marked as resolved by OP
[ 💖 ] ElBretxa
[ 💖 ] ElBretxaOP•10mo ago
Nothing, no reply is sent, so interaction error Yeahh, I went around the code adding some defers, and changing few things, and now works, but I dont know what I did wrong. Really sorry for not being able to say what the exact issue was...
Want results from more Discord servers?
Add your server