Documentation
¶
Index ¶
- Variables
- func CheckIfStructValueISEmpty(value interface{}) string
- func CreateImgFile(imgPath string, img image.Image) error
- func GetErrorEmbed(err error, s *discordgo.Session, gID string) *discordgo.MessageEmbed
- func GetImgbbUploadURL(cfg *config.Configs, imgPath string, expireSecs ...int) (string, error)
- func GetRandomStringFromSet(set []string) string
- func IsLaunchedByDebugger() bool
- func LogErrorsToErrorChannel(s *discordgo.Session, errorLogChannelID string, err error, guildID string)
- func MemberHasRole(session *discordgo.Session, m *discordgo.Member, guildID string, ...) bool
- func RangeIn(low, hi int) int
- func SendResponseErrorToUser(s *discordgo.Session, i *discordgo.InteractionCreate, message string) error
- func StringInSlice(s string, slice []string) bool
- func ToConvertedText(text string, convertGroup string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ApprovalWords = []string{
"enabled",
"on",
"true",
"yes",
"sure",
}
View Source
var DisapprovalWords = []string{
"disabled",
"off",
"false",
"no",
"nope",
}
Functions ¶
func CheckIfStructValueISEmpty ¶
func CheckIfStructValueISEmpty(value interface{}) string
CheckIfStructValueISEmpty Checks if the value is empty and returns it as string if not. Otherwise, return 'N/A'
func GetErrorEmbed ¶
func GetImgbbUploadURL ¶
func GetRandomStringFromSet ¶
func IsLaunchedByDebugger ¶
func IsLaunchedByDebugger() bool
IsLaunchedByDebugger Determines if application is being run by the debugger.
func LogErrorsToErrorChannel ¶
func LogErrorsToErrorChannel(s *discordgo.Session, errorLogChannelID string, err error, guildID string)
LogErrorsToErrorChannel logs any errors to console and send to the Error Discord Channel
func MemberHasRole ¶
func RangeIn ¶
RangeIn Returns pseudo rand num between low and high. For random embed color: RangeIn(1, 16777215)
func SendResponseErrorToUser ¶
func StringInSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.