mirror of
https://github.com/Xevion/r2park.git
synced 2025-12-06 15:16:05 -06:00
Always log, add red color to error handler response
This commit is contained in:
@@ -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(),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user