23 lines
469 B
Go
23 lines
469 B
Go
package handler
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/bwmarrin/discordgo"
|
|
)
|
|
|
|
func (h *Handler) defaultFollowUp(answer string, s *discordgo.Session, i *discordgo.InteractionCreate) {
|
|
|
|
// Sending result:
|
|
_, err := s.FollowupMessageCreate(i.Interaction, true, &discordgo.WebhookParams{
|
|
Content: answer,
|
|
})
|
|
|
|
if err != nil {
|
|
s.FollowupMessageCreate(i.Interaction, true, &discordgo.WebhookParams{
|
|
Content: fmt.Sprintf("Something went wrong: %v", err),
|
|
})
|
|
return
|
|
}
|
|
}
|