how would i make this work

await target.send({ embeds: [dmEmbed] }).catch((err) => { return interaction.reply({ embeds: [unableEmbed] }) });

let kick = await guild.members.kick(target, `${interaction.user.tag} - ${reason}`).catch((err) => { console.log("Error with Kick command: " + err) })
if (kick) {
await interaction.channel.sendTyping(),
await interaction.reply({ embeds: [kickEmbed] })
} else if (!kick) {
interaction.reply({ embeds: [failkickEmbed] })
}
}
}
await target.send({ embeds: [dmEmbed] }).catch((err) => { return interaction.reply({ embeds: [unableEmbed] }) });

let kick = await guild.members.kick(target, `${interaction.user.tag} - ${reason}`).catch((err) => { console.log("Error with Kick command: " + err) })
if (kick) {
await interaction.channel.sendTyping(),
await interaction.reply({ embeds: [kickEmbed] })
} else if (!kick) {
interaction.reply({ embeds: [failkickEmbed] })
}
}
}
6 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Baconburger998
im talking about the replying
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Baconburger998
if it is unable to dm the user it will send send a message saying it cant, then the bot errors and says interaction already replied but if I do followup it would say interaction never replied if it dmed the user
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Baconburger998
hmm or ill just have it log to console thanks