fixed a bug

This commit is contained in:
2025-04-08 10:59:37 -04:00
parent fc3588b1d0
commit e003afab6d
2 changed files with 36 additions and 19 deletions
+11
View File
@@ -2,8 +2,19 @@ package helpers
import (
"fmt"
"github.com/bwmarrin/discordgo"
)
func CreateMessageLink(guildID, channelID, messageID string) string {
return fmt.Sprintf("https://discord.com/channels/%s/%s/%s", guildID, channelID, messageID)
}
func GetOption(options []*discordgo.ApplicationCommandInteractionDataOption, name string) *discordgo.ApplicationCommandInteractionDataOption {
for _, opt := range options {
if opt.Name == name {
return opt
}
}
return nil
}