initial code commit

This commit is contained in:
2025-03-23 13:38:56 -04:00
parent aa1889f6fe
commit edf72fe289
16 changed files with 427 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package commands
import "github.com/bwmarrin/discordgo"
var BoopCommand = &discordgo.ApplicationCommand{
Name: "boop",
Description: "Say Boop!",
}
func HandleBoop(s *discordgo.Session, i *discordgo.InteractionCreate) {
var username string
if i.Member != nil {
username = i.Member.User.Username
} else if i.User != nil {
username = i.User.Username
}
response := &discordgo.InteractionResponse{
Type: discordgo.InteractionResponseChannelMessageWithSource,
Data: &discordgo.InteractionResponseData{
Content: username + ", Boop!",
},
}
s.InteractionRespond(i.Interaction, response)
}