feat(bots/discord/commands/reply): send stacktrace when failed

This commit is contained in:
PalmDevs
2024-03-29 17:25:36 +07:00
parent 8b690b879b
commit 9f1ac37927

View File

@@ -1,3 +1,4 @@
import { createStackTraceEmbed } from '$/utils/discord/embeds'
import { PermissionFlagsBits, SlashCommandBuilder, type TextBasedChannel } from 'discord.js' import { PermissionFlagsBits, SlashCommandBuilder, type TextBasedChannel } from 'discord.js'
import type { Command } from '.' import type { Command } from '.'
@@ -48,7 +49,9 @@ export default {
ephemeral: true, ephemeral: true,
}) })
} catch (e) { } catch (e) {
await interaction.reply({}) await interaction.reply({
embeds: [createStackTraceEmbed(e)],
})
} }
}, },
} satisfies Command } satisfies Command