22 lines
421 B
Go
Raw Normal View History

2024-05-03 21:25:42 +02:00
package services
2024-05-03 22:05:35 +02:00
import (
"github.com/bwmarrin/discordgo"
"strconv"
)
2024-05-03 21:25:42 +02:00
2024-05-03 22:05:35 +02:00
func HandleError(err error, s *discordgo.Session) {
s.ChannelMessageSendComplex(strconv.Itoa(1236038688627101749), &discordgo.MessageSend{
Content: "@here",
Embed: &discordgo.MessageEmbed{
Title: "Error",
Color: 0xff0000,
Fields: []*discordgo.MessageEmbedField{
{
Value: "```" + err.Error() + "```",
},
},
},
})
2024-05-03 21:25:42 +02:00
}