Files
self-bot/Bot/Helpers/helpers.go
T

21 lines
468 B
Go
Raw Normal View History

2025-04-07 16:16:27 -04:00
package helpers
import (
"fmt"
2025-04-08 10:59:37 -04:00
"github.com/bwmarrin/discordgo"
2025-04-07 16:16:27 -04:00
)
func CreateMessageLink(guildID, channelID, messageID string) string {
return fmt.Sprintf("https://discord.com/channels/%s/%s/%s", guildID, channelID, messageID)
}
2025-04-08 10:59:37 -04:00
func GetOption(options []*discordgo.ApplicationCommandInteractionDataOption, name string) *discordgo.ApplicationCommandInteractionDataOption {
for _, opt := range options {
if opt.Name == name {
return opt
}
}
return nil
}