mirror of
https://github.com/Xevion/banner.git
synced 2025-12-09 12:06:32 -06:00
Use embed for respond error, with red color
This commit is contained in:
10
helpers.go
10
helpers.go
@@ -309,10 +309,16 @@ func RespondError(session *discordgo.Session, interaction *discordgo.Interaction
|
|||||||
return session.InteractionRespond(interaction, &discordgo.InteractionResponse{
|
return session.InteractionRespond(interaction, &discordgo.InteractionResponse{
|
||||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||||
Data: &discordgo.InteractionResponseData{
|
Data: &discordgo.InteractionResponseData{
|
||||||
Content: message,
|
Embeds: []*discordgo.MessageEmbed{
|
||||||
|
{
|
||||||
|
Footer: GetFooter(time.Now()),
|
||||||
|
Description: message,
|
||||||
|
Color: 0xff0000,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
AllowedMentions: &discordgo.MessageAllowedMentions{},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetFooter(time time.Time) *discordgo.MessageEmbedFooter {
|
func GetFooter(time time.Time) *discordgo.MessageEmbedFooter {
|
||||||
|
|||||||
Reference in New Issue
Block a user