mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 00:33:59 +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)
|
await command.execute(context, interaction)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
logger.error(`Error while executing command ${interaction.commandName}:`, 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)],
|
embeds: [err instanceof CommandError ? err.toEmbed() : createStackTraceEmbed(err)],
|
||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user