Documentation
¶
Index ¶
- Variables
- func RandomChoice[T comparable](choices []T) T
- func RandomNumber(min, max int) int
- func RandomPercentage() string
- func RandomShuffle[T comparable](slice []T) []T
- type ConsoleMessage
- func (c *ConsoleMessage) AddInfo(key, value string) *ConsoleMessage
- func (c *ConsoleMessage) AddInfoConditional(key, value string, condition bool) *ConsoleMessage
- func (c *ConsoleMessage) SetColor(color string) *ConsoleMessage
- func (c *ConsoleMessage) SetTitle(title string) *ConsoleMessage
- func (c *ConsoleMessage) Show()
- type ConsoleUtils
- type DiscordUtils
- func (DiscordUtils) GetChannel(session *discordgo.Session, channelID string) (*discordgo.Channel, error)
- func (DiscordUtils) GetChannelFromMention(ctx *dgc.Ctx, mention *dgc.Argument) (*discordgo.Channel, bool)
- func (DiscordUtils) GetUserFromMention(session *discordgo.Session, mention *dgc.Argument) (*discordgo.User, bool)
- func (DiscordUtils) SendFileFromURL(ctx *dgc.Ctx, url string, fileName string, headers ...map[string]string) error
- func (DiscordUtils) SleepWithTyping(session *discordgo.Session, channelID string, duration time.Duration)
- type FileUtils
- type InputUtils
- type LoggingUtils
- type MiscUtils
- type StringUtils
Constants ¶
This section is empty.
Variables ¶
View Source
var Console = &ConsoleUtils{}
View Source
var Discord = &DiscordUtils{}
View Source
var File = &FileUtils{}
View Source
var Input = &InputUtils{}
View Source
var Logging = &LoggingUtils{}
View Source
var Misc = &MiscUtils{}
View Source
var String = &StringUtils{}
Functions ¶
func RandomChoice ¶
func RandomChoice[T comparable](choices []T) T
func RandomNumber ¶
func RandomPercentage ¶
func RandomPercentage() string
func RandomShuffle ¶
func RandomShuffle[T comparable](slice []T) []T
Types ¶
type ConsoleMessage ¶
func (*ConsoleMessage) AddInfo ¶
func (c *ConsoleMessage) AddInfo(key, value string) *ConsoleMessage
func (*ConsoleMessage) AddInfoConditional ¶
func (c *ConsoleMessage) AddInfoConditional(key, value string, condition bool) *ConsoleMessage
func (*ConsoleMessage) SetColor ¶
func (c *ConsoleMessage) SetColor(color string) *ConsoleMessage
func (*ConsoleMessage) SetTitle ¶
func (c *ConsoleMessage) SetTitle(title string) *ConsoleMessage
func (*ConsoleMessage) Show ¶
func (c *ConsoleMessage) Show()
type ConsoleUtils ¶
type ConsoleUtils struct{}
func (ConsoleUtils) Clear ¶
func (ConsoleUtils) Clear()
func (ConsoleUtils) Colored ¶
func (ConsoleUtils) Colored(text string, r, g, b int, bold bool) string
func (ConsoleUtils) NewConsoleMessage ¶
func (ConsoleUtils) NewConsoleMessage() *ConsoleMessage
func (ConsoleUtils) PrintBanner ¶
func (ConsoleUtils) PrintBanner()
type DiscordUtils ¶
type DiscordUtils struct{}
func (DiscordUtils) GetChannel ¶
func (DiscordUtils) GetChannelFromMention ¶
func (DiscordUtils) GetUserFromMention ¶
func (DiscordUtils) SendFileFromURL ¶
func (DiscordUtils) SleepWithTyping ¶
type FileUtils ¶
type FileUtils struct{}
func (FileUtils) CreateDirectories ¶
func (FileUtils) GetMainFolder ¶
type InputUtils ¶
type InputUtils struct{}
func (InputUtils) GetString ¶
func (InputUtils) GetString(prompt string) string
func (InputUtils) PrintPrompt ¶
func (InputUtils) PrintPrompt(prompt string)
type LoggingUtils ¶
type LoggingUtils struct{}
func (LoggingUtils) Debug ¶
func (LoggingUtils) Debug(v ...any)
func (LoggingUtils) Error ¶
func (LoggingUtils) Error(v ...any)
func (LoggingUtils) Info ¶
func (LoggingUtils) Info(v ...any)
func (LoggingUtils) Warn ¶
func (LoggingUtils) Warn(v ...any)
type MiscUtils ¶
type MiscUtils struct{}
func (MiscUtils) GetDistance ¶
GetDistance returns the Levenshtein distance between two strings.
type StringUtils ¶
type StringUtils struct{}
func (StringUtils) Capitalize ¶
func (StringUtils) Capitalize(s string) string
func (StringUtils) CenterSlices ¶
func (StringUtils) CenterSlices(rows []string) string
func (StringUtils) RemoveWords ¶
func (StringUtils) RemoveWords(text string, amount int) string
func (StringUtils) Reverse ¶
func (StringUtils) Reverse(s string) string
Click to show internal directories.
Click to hide internal directories.