mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(bots/discord): follow-up if reply is already sent when error
This commit is contained in:
@@ -72,7 +72,7 @@ export default on('interactionCreate', async (context, interaction) => {
|
||||
await command.execute(context, interaction)
|
||||
} catch (err) {
|
||||
logger.error(`Error while executing command ${interaction.commandName}:`, err)
|
||||
await interaction.reply({
|
||||
await interaction[interaction.replied ? 'followUp' : 'reply']({
|
||||
embeds: [err instanceof CommandError ? err.toEmbed() : createStackTraceEmbed(err)],
|
||||
ephemeral: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user