more commands will be added as we continue working on this bot, including service restarts, log monitors
19 lines
410 B
Go
19 lines
410 B
Go
package bot
|
|
|
|
import (
|
|
"github.com/bwmarrin/discordgo"
|
|
)
|
|
|
|
func interactionCreate(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
|
if i.Type != discordgo.InteractionApplicationCommand {
|
|
return
|
|
}
|
|
|
|
switch i.ApplicationCommandData().Name {
|
|
case "ping":
|
|
// Get the host parameter
|
|
// sending s sends the session over to pinger, then i is the interactions we send over
|
|
HandlePingCommand(s, i)
|
|
}
|
|
}
|