Documentation
¶
Index ¶
- func AtRole(role string) string
- func AtUser(user string) string
- func BuildOBIII() error
- func Choose[T any](slice []T) T
- func Contains[T comparable](slice []T, item T) bool
- func EliminationPool[T comparable](round map[T]int, options []T) []T
- func Exit() error
- func IndexOf[T comparable](slice []T, item T) int
- func InitialMessage(s *discordgo.Session, i *discordgo.InteractionCreate, message string) (error error)
- func IsEmpty[T any](slice []T) bool
- func IsNotEmpty[T any](slice []T) bool
- func IsUnique[T comparable](slice []T) bool
- func JumpURL(m *discordgo.Message) string
- func JumpURLByID(channelID, messageID string) string
- func Remove[T comparable](slice []T, item T) []T
- func SelectButtons(s *discordgo.Session, i *discordgo.InteractionCreate, ...) (string, *discordgo.InteractionCreate, error)
- func SelectButtonsEdit(s *discordgo.Session, i *discordgo.InteractionCreate, ...) (string, error)
- func SendDirectMessage(s *discordgo.Session, userID string, message string, ctx ddtrace.SpanContext) error
- func SendDirectMessageWithFile(s *discordgo.Session, userID string, message string, file string, ...) error
- func SigninTypeArray() [15]string
- func StringToType(signinString string) signin.Type
- func UpdateMainBranch() (bool, error)
- func UpdateMessage(s *discordgo.Session, i *discordgo.InteractionCreate, message string) (error error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](slice []T, item T) bool
Contains returns true if a slice contains an item
func EliminationPool ¶
func EliminationPool[T comparable](round map[T]int, options []T) []T
EmliminationPool returns the options with the lowest count in a round
func IndexOf ¶
func IndexOf[T comparable](slice []T, item T) int
IndexOf returns the index of an item in a slice
func InitialMessage ¶
func IsNotEmpty ¶
IsNotEmpty returns true if a slice is not empty
func IsUnique ¶
func IsUnique[T comparable](slice []T) bool
IsUnique returns true if all items in a slice are unique
func JumpURLByID ¶
JumpURLByID returns the URL to jump to a message
func SelectButtons ¶
func SelectButtons(s *discordgo.Session, i *discordgo.InteractionCreate, componentHandlers *map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate), ctx ddtrace.SpanContext, message string, options ...string) (string, *discordgo.InteractionCreate, error)
SelectButtons sends a message with buttons to select from
func SelectButtonsEdit ¶
func SelectButtonsEdit(s *discordgo.Session, i *discordgo.InteractionCreate, componentHandlers *map[string]func(s *discordgo.Session, i *discordgo.InteractionCreate), ctx ddtrace.SpanContext, message string, options ...string) (string, error)
SelectButtonsEdit edits a message with buttons to select from
func SendDirectMessage ¶
func SendDirectMessage(s *discordgo.Session, userID string, message string, ctx ddtrace.SpanContext) error
SendDirectMessage sends a direct message to a user
func SendDirectMessageWithFile ¶
func SendDirectMessageWithFile(s *discordgo.Session, userID string, message string, file string, ctx ddtrace.SpanContext) error
SendDirectMessageWithFile sends a direct message to a user with a file
func SigninTypeArray ¶
func SigninTypeArray() [15]string
Return array of all signin types (update return array length)
func StringToType ¶
Converts signin type string to signin type
func UpdateMainBranch ¶
UpdateMainBranch switches to the main branch, fetches from origin, pulls from origin, and returns true if an update was pulled
func UpdateMessage ¶
Types ¶
This section is empty.