feat(discord bot): added in a ping host command to get the bot going :D
more commands will be added as we continue working on this bot, including service restarts, log monitors
This commit is contained in:
18
controller/internal/bot/interaction.go
Normal file
18
controller/internal/bot/interaction.go
Normal file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user