2024-05-03 21:31:24 +02:00
|
|
|
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 {
|
2024-05-03 22:05:35 +02:00
|
|
|
services.HandleError(err, s)
|
2024-05-03 21:31:24 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func Test1Command(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
|
|
|
|
err := s.InteractionRespond(
|
|
|
|
|
i.Interaction,
|
|
|
|
|
&discordgo.InteractionResponse{
|
|
|
|
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
|
|
|
|
Data: &discordgo.InteractionResponseData{},
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
if err != nil {
|
2024-05-03 22:05:35 +02:00
|
|
|
services.HandleError(err, s)
|
2024-05-03 21:31:24 +02:00
|
|
|
}
|
|
|
|
|
}
|