35 lines
839 B
Go
35 lines
839 B
Go
|
|
package handlers
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/bwmarrin/discordgo"
|
||
|
|
"kleincordBot/services"
|
||
|
|
)
|
||
|
|
|
||
|
|
func ReadBackCommand(data discordgo.ApplicationCommandInteractionData, s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||
|
|
err := s.InteractionRespond(
|
||
|
|
i.Interaction,
|
||
|
|
&discordgo.InteractionResponse{
|
||
|
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||
|
|
Data: &discordgo.InteractionResponseData{
|
||
|
|
Content: data.Options[0].Value.(string),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
)
|
||
|
|
if err != nil {
|
||
|
|
services.HandleError(err)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func Test1Command(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||
|
|
err := s.InteractionRespond(
|
||
|
|
i.Interaction,
|
||
|
|
&discordgo.InteractionResponse{
|
||
|
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||
|
|
Data: &discordgo.InteractionResponseData{},
|
||
|
|
},
|
||
|
|
)
|
||
|
|
if err != nil {
|
||
|
|
services.HandleError(err)
|
||
|
|
}
|
||
|
|
}
|