21 lines
468 B
Go
21 lines
468 B
Go
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
|
|
}
|