fixed a bug
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user