Files
velox-bot/internal/commands/commands.go
T
2026-03-17 04:20:39 +00:00

22 lines
440 B
Go

package commands
import (
"velox-bot/internal/commands/fun"
"github.com/bwmarrin/discordgo"
)
var AllCommands = []*discordgo.ApplicationCommand{
fun.PingCommand,
}
var handlers = map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate){
"ping": fun.HandlePing,
}
func HandleInteraction(s *discordgo.Session, i *discordgo.InteractionCreate) {
if h, ok := handlers[i.ApplicationCommandData().Name]; ok {
h(s, i)
}
}