Always log, add red color to error handler response

This commit is contained in:
2024-02-28 04:09:53 -06:00
parent fb2e178e93
commit 8b5dc0835a

View File

@@ -172,15 +172,14 @@ func GetFooterText() string {
// HandleError(session, interaction, parse_err) // HandleError(session, interaction, parse_err)
func HandleError(session *discordgo.Session, interaction *discordgo.InteractionCreate, err error, message string) { func HandleError(session *discordgo.Session, interaction *discordgo.InteractionCreate, err error, message string) {
if err != nil { log.Errorf("%s (%v)", message, err)
log.Errorf("%s (%v)", message, err)
}
err = session.InteractionRespond(interaction.Interaction, &discordgo.InteractionResponse{ err = session.InteractionRespond(interaction.Interaction, &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource, Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{ Data: &discordgo.InteractionResponseData{
Embeds: []*discordgo.MessageEmbed{ Embeds: []*discordgo.MessageEmbed{
{ {
Color: 0xff0000,
Footer: &discordgo.MessageEmbedFooter{ Footer: &discordgo.MessageEmbedFooter{
Text: GetFooterText(), Text: GetFooterText(),
}, },