Documentation ¶
Index ¶
- Variables
- func FileToSlice(inputFile string) []string
- func GetCdnUri(fileName string) string
- func GetNickFromInteraction(i *discordgo.InteractionCreate) string
- func GetOptionsFromInteraction(i *discordgo.InteractionCreate) map[string]*discordgo.ApplicationCommandInteractionDataOption
- func GetOptionsStringsFromInteraction(i *discordgo.InteractionCreate) map[string]string
- func GetUsernameFromInteraction(i *discordgo.InteractionCreate) string
- func GetUserobjectFromInteraction(i *discordgo.InteractionCreate) *discordgo.User
- func HexToDec(hex string) int
- func LogCmd(i *discordgo.InteractionCreate)
- func RandomMemberName(members []*discordgo.Member) string
- func ReturnInteractionMessageUrl(i *discordgo.InteractionCreate) string
- type CustomizationOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Log *slog.Logger LogLevel *slog.LevelVar )
Functions ¶
func FileToSlice ¶
func GetNickFromInteraction ¶
func GetNickFromInteraction(i *discordgo.InteractionCreate) string
Gets the nickname for the user that invoked the interaction in a guild if set, if not set or invoked in a direct message you get the username.
func GetOptionsFromInteraction ¶
func GetOptionsFromInteraction(i *discordgo.InteractionCreate) map[string]*discordgo.ApplicationCommandInteractionDataOption
func GetOptionsStringsFromInteraction ¶ added in v0.3.5
func GetOptionsStringsFromInteraction(i *discordgo.InteractionCreate) map[string]string
func GetUsernameFromInteraction ¶
func GetUsernameFromInteraction(i *discordgo.InteractionCreate) string
Gets the actual Discord username for the user that invoked an interaction, don't use this when you want want a nickname instead.
func GetUserobjectFromInteraction ¶ added in v0.3.5
func GetUserobjectFromInteraction(i *discordgo.InteractionCreate) *discordgo.User
func LogCmd ¶ added in v0.3.5
func LogCmd(i *discordgo.InteractionCreate)
func RandomMemberName ¶ added in v0.4.1
func ReturnInteractionMessageUrl ¶
func ReturnInteractionMessageUrl(i *discordgo.InteractionCreate) string
Types ¶
type CustomizationOptions ¶
type CustomizationOptions struct { BotName string `json:"BotName"` RootCommand string `json:"RootCommand"` DocsURL string `json:"DocsURL"` CDN struct { BaseURL string Files map[string]string } }
func GetCustoms ¶ added in v0.3.3
func GetCustoms() CustomizationOptions
Click to show internal directories.
Click to hide internal directories.