initial code commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package helpers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
)
|
||||
|
||||
// HandleError sends an error response including the error text and an emoji.
|
||||
func HandleError(s *discordgo.Session, i *discordgo.InteractionCreate, err error) {
|
||||
content := fmt.Sprintf("Error: %s <:error:1353407137421721620>", err.Error())
|
||||
s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
Content: content,
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user