package handler import ( "log" "github.com/bwmarrin/discordgo" ) func (h *router) Ping() CommandRoute { return CommandRoute{ Command: discordgo.ApplicationCommand{ Name: "ping", Description: "pongs in a reply", }, Handler: func(s *discordgo.Session, i *discordgo.InteractionCreate) { log.Println("ok, I'm here..") err := s.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{ Type: discordgo.InteractionResponseChannelMessageWithSource, Data: &discordgo.InteractionResponseData{ Content: "`pong`", Title: "Pong reply", }, }) if err != nil { log.Println(err) } }, } }